org.codehaus.aspectwerkz.reflect.impl.javassist
Class JavassistClassInfo

java.lang.Object
  extended byorg.codehaus.aspectwerkz.reflect.impl.javassist.JavassistClassInfo
All Implemented Interfaces:
ClassInfo, ReflectionInfo

public class JavassistClassInfo
extends Object
implements ClassInfo

Implementation of the ClassInfo interface for Javassist.

Author:
Jonas Bonér , Alexandre Vasseur

Nested Class Summary
 
Nested classes inherited from class org.codehaus.aspectwerkz.reflect.ClassInfo
ClassInfo.NullClassInfo
 
Method Summary
 boolean equals(Object o)
           
 List getAnnotations()
          Returns the annotations.
static ClassInfo getClassInfo(javassist.CtClass clazz, ClassLoader loader)
          Returns the class info for a specific ctClass.
 ClassInfo getComponentType()
          Returns the component type if array type else null.
 ConstructorInfo getConstructor(int hash)
          Returns a constructor info by its hash.
 ConstructorInfo[] getConstructors()
          Returns a list with all the constructors info.
 FieldInfo getField(int hash)
          Returns a field info by its hash.
 FieldInfo[] getFields()
          Returns a list with all the field info.
 ClassInfo[] getInterfaces()
          Returns the interfaces.
 MethodInfo getMethod(int hash)
          Returns a method info by its hash.
 MethodInfo[] getMethods()
          Returns a list with all the methods info.
 int getModifiers()
          Returns the class modifiers.
 String getName()
          Returns the name of the class.
 ClassInfo getSuperClass()
          Returns the super class.
 int hashCode()
           
 boolean isArray()
          Is the class an array type.
 boolean isInterface()
          Is the class an interface.
 boolean isPrimitive()
          Is the class a primitive type.
static void markDirty(javassist.CtClass clazz, ClassLoader loader)
          Marks the class as dirty (since it has been modified and needs to be rebuild).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getClassInfo

public static ClassInfo getClassInfo(javassist.CtClass clazz,
                                     ClassLoader loader)
Returns the class info for a specific ctClass.

Parameters:
clazz -
loader -
Returns:
the class info

markDirty

public static void markDirty(javassist.CtClass clazz,
                             ClassLoader loader)
Marks the class as dirty (since it has been modified and needs to be rebuild).

Parameters:
clazz -
loader -

getAnnotations

public List getAnnotations()
Returns the annotations.

Specified by:
getAnnotations in interface ReflectionInfo
Returns:
the annotations

getName

public String getName()
Returns the name of the class.

Specified by:
getName in interface ReflectionInfo
Returns:
the name of the class

getModifiers

public int getModifiers()
Returns the class modifiers.

Specified by:
getModifiers in interface ReflectionInfo
Returns:
the class modifiers

getConstructor

public ConstructorInfo getConstructor(int hash)
Returns a constructor info by its hash.

Specified by:
getConstructor in interface ClassInfo
Parameters:
hash -
Returns:

getConstructors

public ConstructorInfo[] getConstructors()
Returns a list with all the constructors info.

Specified by:
getConstructors in interface ClassInfo
Returns:
the constructors info

getMethod

public MethodInfo getMethod(int hash)
Returns a method info by its hash.

Specified by:
getMethod in interface ClassInfo
Parameters:
hash -
Returns:

getMethods

public MethodInfo[] getMethods()
Returns a list with all the methods info.

Specified by:
getMethods in interface ClassInfo
Returns:
the methods info

getField

public FieldInfo getField(int hash)
Returns a field info by its hash.

Specified by:
getField in interface ClassInfo
Parameters:
hash -
Returns:

getFields

public FieldInfo[] getFields()
Returns a list with all the field info.

Specified by:
getFields in interface ClassInfo
Returns:
the field info

getInterfaces

public ClassInfo[] getInterfaces()
Returns the interfaces.

Specified by:
getInterfaces in interface ClassInfo
Returns:
the interfaces

getSuperClass

public ClassInfo getSuperClass()
Returns the super class.

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

getComponentType

public ClassInfo getComponentType()
Returns the component type if array type else null.

Specified by:
getComponentType in interface ClassInfo
Returns:
the component type

isInterface

public boolean isInterface()
Is the class an interface.

Specified by:
isInterface in interface ClassInfo
Returns:

isPrimitive

public boolean isPrimitive()
Is the class a primitive type.

Specified by:
isPrimitive in interface ClassInfo
Returns:

isArray

public boolean isArray()
Is the class an array type.

Specified by:
isArray in interface ClassInfo
Returns:

equals

public boolean equals(Object o)

hashCode

public int hashCode()

toString

public String toString()


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.