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
ConstructorsModifierConstructorDescriptionprotected
ClassItemWrapper
(IClass clas, ClassItem item) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionint
Get access flags.int
Get number of arguments for method.getArgumentType
(int index) Get argument type as fully qualified class name.protected ClassItem
Get class item information.protected IClass
Get 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.boolean
Check if item is an initializer.boolean
isMethod()
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:IClassItem
Get owning class information.- Specified by:
getOwningClass
in interfaceIClassItem
- Returns:
- owning class information
-
getName
Description copied from interface:IClassItem
Get item name.- Specified by:
getName
in interfaceIClassItem
- Returns:
- item name
-
getJavaDoc
Description copied from interface:IClassItem
Get item JavaDoc description, if available.- Specified by:
getJavaDoc
in interfaceIClassItem
- Returns:
- non-empty JavaDoc text (
null
if not available)
-
getTypeName
Description copied from interface:IClassItem
Get item type as fully qualified class name.- Specified by:
getTypeName
in interfaceIClassItem
- Returns:
- item type name
-
getReturnJavaDoc
Description copied from interface:IClassItem
Get return JavaDoc description for method, if available.- Specified by:
getReturnJavaDoc
in interfaceIClassItem
- Returns:
- non-empty JavaDoc text (
null
if not available)
-
getArgumentCount
public int getArgumentCount()Description copied from interface:IClassItem
Get number of arguments for method.- Specified by:
getArgumentCount
in interfaceIClassItem
- Returns:
- argument count for method, or
-1
if not a method
-
getArgumentType
Description copied from interface:IClassItem
Get argument type as fully qualified class name. This method will throw a runtime exception if called on a field.- Specified by:
getArgumentType
in interfaceIClassItem
- Parameters:
index
- argument number- Returns:
- argument type name
-
getParameterJavaDoc
Description copied from interface:IClassItem
Get method parameter JavaDoc description, if available. This method will throw a runtime exception if called on a field.- Specified by:
getParameterJavaDoc
in interfaceIClassItem
- Parameters:
index
- parameter number- Returns:
- non-empty JavaDoc text (
null
if not available)
-
getParameterName
Description copied from interface:IClassItem
Get method parameter name, if available. This method will throw a runtime exception if called on a field.- Specified by:
getParameterName
in interfaceIClassItem
- Parameters:
index
- parameter number- Returns:
- parameter name (
null
if not available)
-
getAccessFlags
public int getAccessFlags()Description copied from interface:IClassItem
Get access flags.- Specified by:
getAccessFlags
in interfaceIClassItem
- Returns:
- flags for access type of field or method
-
getSignature
Description copied from interface:IClassItem
Get field or method signature.- Specified by:
getSignature
in interfaceIClassItem
- Returns:
- encoded method signature
-
isMethod
public boolean isMethod()Description copied from interface:IClassItem
Check if item is a method.- Specified by:
isMethod
in interfaceIClassItem
- Returns:
true
if a method,false
if a field
-
isInitializer
public boolean isInitializer()Description copied from interface:IClassItem
Check if item is an initializer.- Specified by:
isInitializer
in interfaceIClassItem
- Returns:
true
if an initializer,false
if a field or normal method
-
getExceptions
Description copied from interface:IClassItem
Get names of exceptions thrown by method.- Specified by:
getExceptions
in interfaceIClassItem
- Returns:
- array of exceptions thrown by method, or
null
if a field
-
getExceptionJavaDoc
Description copied from interface:IClassItem
Get method throws JavaDoc description, if available. This method will throw a runtime exception if called on a field.- Specified by:
getExceptionJavaDoc
in interfaceIClassItem
- Parameters:
index
- exception index (into array returned byIClassItem.getExceptions()
- Returns:
- non-empty JavaDoc text (
null
if not available)
-
getGenericsSignature
Description copied from interface:IClassItem
Get the generics signature information for item.- Specified by:
getGenericsSignature
in interfaceIClassItem
- Returns:
- generics signature (
null
if none)
-