Package org.jibx.custom.classes
Class ClassItemSourceWrapper
java.lang.Object
org.jibx.binding.model.ClassItemWrapper
org.jibx.custom.classes.ClassItemSourceWrapper
- All Implemented Interfaces:
IClassItem
Wrapper for class field or method item with added source information. This wraps the basic class handling
implementation with added support for retrieving information from source files.
- Author:
- Dennis M. Sosnoski
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringReturn JavaDoc text only if non-empty.getExceptionJavaDoc(int index) Get method throws JavaDoc description, if available.private MemberInternal method to get the source code information for this item.Get item JavaDoc description, if available.getParameterJavaDoc(int index) Get method parameter JavaDoc description, if available.getParameterName(int index) Get method parameter name, if available.Get return JavaDoc description for method, if available.private booleanmatchSignature(JavaMethod method) Check for source method signature match.Methods inherited from class org.jibx.binding.model.ClassItemWrapper
getAccessFlags, getArgumentCount, getArgumentType, getClassItem, getContainingClass, getExceptions, getGenericsSignature, getName, getOwningClass, getSignature, getTypeName, isInitializer, isMethod
-
Field Details
-
m_checkedSource
private boolean m_checkedSource -
m_itemSource
private Member m_itemSource
-
-
Constructor Details
-
ClassItemSourceWrapper
Constructor- Parameters:
clas-item-
-
-
Method Details
-
matchSignature
private boolean matchSignature(JavaMethod method) Check for source method signature match.- Parameters:
method-- Returns:
trueif match to this method,falseif not
-
getItemSource
private Member getItemSource()Internal method to get the source code information for this item.- Returns:
- source information
-
docText
Return JavaDoc text only if non-empty.- Parameters:
text- raw JavaDoc text- Returns:
- trimmed text if non-empty, otherwise
null
-
getJavaDoc
Description copied from interface:IClassItemGet item JavaDoc description, if available.- Specified by:
getJavaDocin interfaceIClassItem- Overrides:
getJavaDocin classClassItemWrapper- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getReturnJavaDoc
Description copied from interface:IClassItemGet return JavaDoc description for method, if available.- Specified by:
getReturnJavaDocin interfaceIClassItem- Overrides:
getReturnJavaDocin classClassItemWrapper- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getParameterJavaDoc
Description copied from interface:IClassItemGet method parameter JavaDoc description, if available. This method will throw a runtime exception if called on a field.- Specified by:
getParameterJavaDocin interfaceIClassItem- Overrides:
getParameterJavaDocin classClassItemWrapper- Parameters:
index- parameter number- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getParameterName
Description copied from interface:IClassItemGet method parameter name, if available. This method will throw a runtime exception if called on a field.- Specified by:
getParameterNamein interfaceIClassItem- Overrides:
getParameterNamein classClassItemWrapper- Parameters:
index- parameter number- Returns:
- parameter name (
nullif not available)
-
getExceptionJavaDoc
Description copied from interface:IClassItemGet method throws JavaDoc description, if available. This method will throw a runtime exception if called on a field.- Specified by:
getExceptionJavaDocin interfaceIClassItem- Overrides:
getExceptionJavaDocin classClassItemWrapper- Parameters:
index- exception index (into array returned byIClassItem.getExceptions()- Returns:
- non-empty JavaDoc text (
nullif not available)
-