org.jboss.reflect.plugins
Class ClassInfoImpl

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.InheritableAnnotationHolder
          extended by org.jboss.reflect.plugins.ClassInfoImpl
All Implemented Interfaces:
Serializable, Cloneable, AnnotatedInfo, ClassInfo, ModifierInfo, TypeInfo, org.jboss.util.JBossInterface
Direct Known Subclasses:
ArrayInfoImpl, EnumInfoImpl, InterfaceInfoImpl

public class ClassInfoImpl
extends InheritableAnnotationHolder
implements ClassInfo

Class info

Author:
Bill Burke, Adrian Brock
See Also:
Serialized Form

Field Summary
protected  ConstructorInfo[] constructors
          The constructor info
protected  HashMap fieldMap
          Field map Map
protected  FieldInfo[] fields
          The fields
protected  InterfaceInfo[] interfaces
          The interfaces
protected  MethodInfo[] methods
          The methods
protected  int modifiers
          The class modifiers
protected  String name
          The class name
protected  ClassInfo superclass
          The super class
 
Fields inherited from class org.jboss.reflect.plugins.InheritableAnnotationHolder
allAnnotations, allAnnotationsArray, annotatedElement, declaredAnnotations, declaredAnnotationsArray, typeInfoFactory
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Fields inherited from interface org.jboss.reflect.spi.ModifierInfo
ABSTRACT, CONSTANT, FINAL, PACKAGE, PACKAGE_ABSTRACT, PACKAGE_CONSTANT, PACKAGE_STATIC, PRIVATE, PRIVATE_CONSTANT, PRIVATE_STATIC, PROTECTED, PROTECTED_ABSTRACT, PROTECTED_CONSTANT, PROTECTED_STATIC, PUBLIC, PUBLIC_ABSTRACT, PUBLIC_CONSTANT, PUBLIC_STATIC, STATIC
 
Constructor Summary
ClassInfoImpl()
          Create a new abstract ClassInfo.
ClassInfoImpl(String name)
          Create a new class info
ClassInfoImpl(String name, int modifiers, InterfaceInfo[] interfaces, ClassInfoImpl superclass)
          Create a new abstract ClassInfo.
 
Method Summary
 boolean equals(Object obj)
           
static MethodInfo findMethod(MethodInfo[] methods, String name, TypeInfo[] parameters)
          Find a method
 ConstructorInfo[] getDeclaredConstructors()
          Get the declared constructors
 FieldInfo getDeclaredField(String name)
          Get the declared field
 FieldInfo[] getDeclaredFields()
          Get the declared fields
 MethodInfo getDeclaredMethod(String name, TypeInfo[] parameters)
          Get the declared method
 MethodInfo[] getDeclaredMethods()
          Get the declared methods
 InterfaceInfo[] getInterfaces()
          Get the interfaces
 int getModifiers()
          Get the modifiers
 String getName()
          Get the class name
 ClassInfo getSuperclass()
          Get the super class
protected  InheritableAnnotationHolder getSuperHolder()
          Get the super holder of annoations
 Class getType()
          Get the class
 int hashCode()
           
 boolean isInterface()
          Whether it is an interface
 boolean isPublic()
          Whether it is public
 boolean isStatic()
          Whether it is static
 void setDeclaredConstructors(ConstructorInfoImpl[] constructors)
          Set the declared constructors
 void setDeclaredFields(FieldInfoImpl[] fields)
          Set the declared fields
 void setDeclaredMethods(MethodInfoImpl[] methods)
          Set the declared methods
 void setInterfaces(InterfaceInfo[] interfaces)
          Set the interfaces
 void setSuperclass(ClassInfo superInfo)
          Set the super class
 void setType(Class type)
          Set the type
protected  void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.reflect.plugins.InheritableAnnotationHolder
getAllAnnotations, getAnnotation, getAnnotations, getDeclaredAnnotations, isAnnotationPresent, setAnnotatedElement, setTypeInfoFactory, setupAnnotations
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, list, notEqual, toShortString, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.reflect.spi.AnnotatedInfo
getAnnotation, getAnnotations, isAnnotationPresent
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Field Detail

name

protected String name
The class name


modifiers

protected int modifiers
The class modifiers


interfaces

protected InterfaceInfo[] interfaces
The interfaces


methods

protected MethodInfo[] methods
The methods


fields

protected FieldInfo[] fields
The fields


fieldMap

protected HashMap fieldMap
Field map Map


superclass

protected ClassInfo superclass
The super class


constructors

protected ConstructorInfo[] constructors
The constructor info

Constructor Detail

ClassInfoImpl

public ClassInfoImpl()
Create a new abstract ClassInfo.


ClassInfoImpl

public ClassInfoImpl(String name)
Create a new class info

Parameters:
name - the class name

ClassInfoImpl

public ClassInfoImpl(String name,
                     int modifiers,
                     InterfaceInfo[] interfaces,
                     ClassInfoImpl superclass)
Create a new abstract ClassInfo.

Parameters:
name - the class name
modifiers - the class modifiers
interfaces - the interfaces
superclass - the super class
Method Detail

findMethod

public static MethodInfo findMethod(MethodInfo[] methods,
                                    String name,
                                    TypeInfo[] parameters)
Find a method

Parameters:
methods - the methods
name - the name
parameters - the parameters
Returns:
the method info

setType

public void setType(Class type)
Set the type

Parameters:
type - the class

setInterfaces

public void setInterfaces(InterfaceInfo[] interfaces)
Set the interfaces

Parameters:
interfaces - the interfaces

setDeclaredMethods

public void setDeclaredMethods(MethodInfoImpl[] methods)
Set the declared methods

Parameters:
methods - the methods

setDeclaredFields

public void setDeclaredFields(FieldInfoImpl[] fields)
Set the declared fields

Parameters:
fields - the fields

setDeclaredConstructors

public void setDeclaredConstructors(ConstructorInfoImpl[] constructors)
Set the declared constructors

Parameters:
constructors - the constructors

setSuperclass

public void setSuperclass(ClassInfo superInfo)
Set the super class

Parameters:
superInfo - the super class

isInterface

public boolean isInterface()
Description copied from interface: ClassInfo
Whether it is an interface

Specified by:
isInterface in interface ClassInfo
Returns:
true when an interface

getInterfaces

public InterfaceInfo[] getInterfaces()
Description copied from interface: ClassInfo
Get the interfaces

Specified by:
getInterfaces in interface ClassInfo
Returns:
the interfaces

getDeclaredMethod

public MethodInfo getDeclaredMethod(String name,
                                    TypeInfo[] parameters)
Description copied from interface: ClassInfo
Get the declared method

Specified by:
getDeclaredMethod in interface ClassInfo
Parameters:
name - the method name
parameters - the parameters
Returns:
the method info

getDeclaredMethods

public MethodInfo[] getDeclaredMethods()
Description copied from interface: ClassInfo
Get the declared methods

Specified by:
getDeclaredMethods in interface ClassInfo
Returns:
the methods

getDeclaredField

public FieldInfo getDeclaredField(String name)
Description copied from interface: ClassInfo
Get the declared field

Specified by:
getDeclaredField in interface ClassInfo
Parameters:
name - the field name
Returns:
the field

getDeclaredFields

public FieldInfo[] getDeclaredFields()
Description copied from interface: ClassInfo
Get the declared fields

Specified by:
getDeclaredFields in interface ClassInfo
Returns:
the fields

getDeclaredConstructors

public ConstructorInfo[] getDeclaredConstructors()
Description copied from interface: ClassInfo
Get the declared constructors

Specified by:
getDeclaredConstructors in interface ClassInfo
Returns:
the constructors

getSuperclass

public ClassInfo getSuperclass()
Description copied from interface: ClassInfo
Get the super class

Specified by:
getSuperclass in interface ClassInfo
Returns:
the super class

getModifiers

public int getModifiers()
Description copied from interface: ModifierInfo
Get the modifiers

Specified by:
getModifiers in interface ModifierInfo
Returns:
the modifiers

isStatic

public boolean isStatic()
Description copied from interface: ModifierInfo
Whether it is static

Specified by:
isStatic in interface ModifierInfo
Returns:
true when static

isPublic

public boolean isPublic()
Description copied from interface: ModifierInfo
Whether it is public

Specified by:
isPublic in interface ModifierInfo
Returns:
true when public

getName

public String getName()
Description copied from interface: ClassInfo
Get the class name

Specified by:
getName in interface ClassInfo
Specified by:
getName in interface TypeInfo
Returns:
the name

getType

public Class getType()
Description copied from interface: TypeInfo
Get the class

Specified by:
getType in interface TypeInfo
Returns:
the class

getSuperHolder

protected InheritableAnnotationHolder getSuperHolder()
Description copied from class: InheritableAnnotationHolder
Get the super holder of annoations

Specified by:
getSuperHolder in class InheritableAnnotationHolder
Returns:
the super holder

toString

protected void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class org.jboss.util.JBossObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class org.jboss.util.JBossObject


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.