Class ClassItemWrapper

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

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
  • Field Details

    • m_class

      private final IClass m_class
    • m_item

      private final ClassItem m_item
  • Constructor Details

    • ClassItemWrapper

      protected ClassItemWrapper(IClass clas, ClassItem item)
      Constructor.
      Parameters:
      clas -
      item -
  • Method Details

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