Package org.jibx.binding.model
Class ClassItemWrapper
java.lang.Object
org.jibx.binding.model.ClassItemWrapper
- All Implemented Interfaces:
IClassItem
- Direct Known Subclasses:
ClassItemSourceWrapper
Wrapper for class field or method item information. This wraps the BCEL-based
class handling implementation to support the interface defined for use with
the binding model.
- Author:
- Dennis M. Sosnoski
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedClassItemWrapper(IClass clas, ClassItem item) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionintGet access flags.intGet number of arguments for method.getArgumentType(int index) Get argument type as fully qualified class name.protected ClassItemGet class item information.protected IClassGet containing class information.getExceptionJavaDoc(int index) Get method throws JavaDoc description, if available.String[]Get names of exceptions thrown by method.Get the generics signature information for item.Get item JavaDoc description, if available.getName()Get item name.Get owning class information.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.Get field or method signature.Get item type as fully qualified class name.booleanCheck if item is an initializer.booleanisMethod()Check if item is a method.
-
Field Details
-
m_class
-
m_item
-
-
Constructor Details
-
ClassItemWrapper
Constructor.- Parameters:
clas-item-
-
-
Method Details
-
getContainingClass
Get containing class information.- Returns:
- class information
-
getClassItem
Get class item information.- Returns:
- item information
-
getOwningClass
Description copied from interface:IClassItemGet owning class information.- Specified by:
getOwningClassin interfaceIClassItem- Returns:
- owning class information
-
getName
Description copied from interface:IClassItemGet item name.- Specified by:
getNamein interfaceIClassItem- Returns:
- item name
-
getJavaDoc
Description copied from interface:IClassItemGet item JavaDoc description, if available.- Specified by:
getJavaDocin interfaceIClassItem- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getTypeName
Description copied from interface:IClassItemGet item type as fully qualified class name.- Specified by:
getTypeNamein interfaceIClassItem- Returns:
- item type name
-
getReturnJavaDoc
Description copied from interface:IClassItemGet return JavaDoc description for method, if available.- Specified by:
getReturnJavaDocin interfaceIClassItem- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getArgumentCount
public int getArgumentCount()Description copied from interface:IClassItemGet number of arguments for method.- Specified by:
getArgumentCountin interfaceIClassItem- Returns:
- argument count for method, or
-1if not a method
-
getArgumentType
Description copied from interface:IClassItemGet argument type as fully qualified class name. This method will throw a runtime exception if called on a field.- Specified by:
getArgumentTypein interfaceIClassItem- Parameters:
index- argument number- Returns:
- argument type name
-
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- 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- Parameters:
index- parameter number- Returns:
- parameter name (
nullif not available)
-
getAccessFlags
public int getAccessFlags()Description copied from interface:IClassItemGet access flags.- Specified by:
getAccessFlagsin interfaceIClassItem- Returns:
- flags for access type of field or method
-
getSignature
Description copied from interface:IClassItemGet field or method signature.- Specified by:
getSignaturein interfaceIClassItem- Returns:
- encoded method signature
-
isMethod
public boolean isMethod()Description copied from interface:IClassItemCheck if item is a method.- Specified by:
isMethodin interfaceIClassItem- Returns:
trueif a method,falseif a field
-
isInitializer
public boolean isInitializer()Description copied from interface:IClassItemCheck if item is an initializer.- Specified by:
isInitializerin interfaceIClassItem- Returns:
trueif an initializer,falseif a field or normal method
-
getExceptions
Description copied from interface:IClassItemGet names of exceptions thrown by method.- Specified by:
getExceptionsin interfaceIClassItem- Returns:
- array of exceptions thrown by method, or
nullif a field
-
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- Parameters:
index- exception index (into array returned byIClassItem.getExceptions()- Returns:
- non-empty JavaDoc text (
nullif not available)
-
getGenericsSignature
Description copied from interface:IClassItemGet the generics signature information for item.- Specified by:
getGenericsSignaturein interfaceIClassItem- Returns:
- generics signature (
nullif none)
-