org.jibx.binding.model
Class ClassItemWrapper

java.lang.Object
  extended by org.jibx.binding.model.ClassItemWrapper
All Implemented Interfaces:
IClassItem
Direct Known Subclasses:
ClassItemSourceWrapper

public class ClassItemWrapper
extends java.lang.Object
implements IClassItem

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
private  IClass m_class
           
private  ClassItem m_item
           
 
Constructor Summary
protected ClassItemWrapper(IClass clas, ClassItem item)
          Constructor.
 
Method Summary
 int getAccessFlags()
          Get access flags.
 int getArgumentCount()
          Get number of arguments for method.
 java.lang.String getArgumentType(int index)
          Get argument type as fully qualified class name.
protected  ClassItem getClassItem()
          Get class item information.
protected  IClass getContainingClass()
          Get containing class information.
 java.lang.String getExceptionJavaDoc(int index)
          Get method throws JavaDoc description, if available.
 java.lang.String[] getExceptions()
          Get names of exceptions thrown by method.
 java.lang.String getGenericsSignature()
          Get the generics signature information for item.
 java.lang.String getJavaDoc()
          Get item JavaDoc description, if available.
 java.lang.String getName()
          Get item name.
 IClass getOwningClass()
          Get owning class information.
 java.lang.String getParameterJavaDoc(int index)
          Get method parameter JavaDoc description, if available.
 java.lang.String getParameterName(int index)
          Get method parameter name, if available.
 java.lang.String getReturnJavaDoc()
          Get return JavaDoc description for method, if available.
 java.lang.String getSignature()
          Get field or method signature.
 java.lang.String getTypeName()
          Get item type as fully qualified class name.
 boolean isInitializer()
          Check if item is an initializer.
 boolean isMethod()
          Check if item is a method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_class

private final IClass m_class

m_item

private final ClassItem m_item
Constructor Detail

ClassItemWrapper

protected ClassItemWrapper(IClass clas,
                           ClassItem item)
Constructor.

Parameters:
clas -
item -
Method Detail

getContainingClass

protected IClass getContainingClass()
Get containing class information.

Returns:
class information

getClassItem

protected ClassItem getClassItem()
Get class item information.

Returns:
item information

getOwningClass

public IClass getOwningClass()
Description copied from interface: IClassItem
Get owning class information.

Specified by:
getOwningClass in interface IClassItem
Returns:
owning class information

getName

public java.lang.String getName()
Description copied from interface: IClassItem
Get item name.

Specified by:
getName in interface IClassItem
Returns:
item name

getJavaDoc

public java.lang.String getJavaDoc()
Description copied from interface: IClassItem
Get item JavaDoc description, if available.

Specified by:
getJavaDoc in interface IClassItem
Returns:
non-empty JavaDoc text (null if not available)

getTypeName

public java.lang.String getTypeName()
Description copied from interface: IClassItem
Get item type as fully qualified class name.

Specified by:
getTypeName in interface IClassItem
Returns:
item type name

getReturnJavaDoc

public java.lang.String getReturnJavaDoc()
Description copied from interface: IClassItem
Get return JavaDoc description for method, if available.

Specified by:
getReturnJavaDoc in interface IClassItem
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 interface IClassItem
Returns:
argument count for method, or -1 if not a method

getArgumentType

public java.lang.String getArgumentType(int index)
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 interface IClassItem
Parameters:
index - argument number
Returns:
argument type name

getParameterJavaDoc

public java.lang.String getParameterJavaDoc(int index)
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 interface IClassItem
Parameters:
index - parameter number
Returns:
non-empty JavaDoc text (null if not available)

getParameterName

public java.lang.String getParameterName(int index)
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 interface IClassItem
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 interface IClassItem
Returns:
flags for access type of field or method

getSignature

public java.lang.String getSignature()
Description copied from interface: IClassItem
Get field or method signature.

Specified by:
getSignature in interface IClassItem
Returns:
encoded method signature

isMethod

public boolean isMethod()
Description copied from interface: IClassItem
Check if item is a method.

Specified by:
isMethod in interface IClassItem
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 interface IClassItem
Returns:
true if an initializer, false if a field or normal method

getExceptions

public java.lang.String[] getExceptions()
Description copied from interface: IClassItem
Get names of exceptions thrown by method.

Specified by:
getExceptions in interface IClassItem
Returns:
array of exceptions thrown by method, or null if a field

getExceptionJavaDoc

public java.lang.String getExceptionJavaDoc(int index)
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 interface IClassItem
Parameters:
index - exception index (into array returned by IClassItem.getExceptions()
Returns:
non-empty JavaDoc text (null if not available)

getGenericsSignature

public java.lang.String getGenericsSignature()
Description copied from interface: IClassItem
Get the generics signature information for item.

Specified by:
getGenericsSignature in interface IClassItem
Returns:
generics signature (null if none)


Project Web Site