org.jibx.binding.model
Class ClassItemWrapper

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

public class ClassItemWrapper
extends 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

Constructor Summary
protected ClassItemWrapper(IClass clas, ClassItem item)
          Constructor.
 
Method Summary
 int getAccessFlags()
          Get access flags.
 int getArgumentCount()
          Get number of arguments for method.
 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.
 String getExceptionJavaDoc(int index)
          Get method throws JavaDoc description, if available.
 String[] getExceptions()
          Get names of exceptions thrown by method.
 String getGenericsSignature()
          Get the generics signature information for item.
 String getJavaDoc()
          Get item JavaDoc description, if available.
 String getName()
          Get item name.
 IClass getOwningClass()
          Get owning class information.
 String getParameterJavaDoc(int index)
          Get method parameter JavaDoc description, if available.
 String getParameterName(int index)
          Get method parameter name, if available.
 String getReturnJavaDoc()
          Get return JavaDoc description for method, if available.
 String getSignature()
          Get field or method signature.
 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
 

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 String getName()
Description copied from interface: IClassItem
Get item name.

Specified by:
getName in interface IClassItem
Returns:
item name

getJavaDoc

public 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 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 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 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 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 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 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 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 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 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)


Copyright © 2005-2011 jibx.org. All Rights Reserved.