| java.lang.Object org.codehaus.aspectwerkz.reflect.impl.asm.AsmClassInfo
AsmClassInfo | public class AsmClassInfo implements ClassInfo(Code) | | Implementation of the ClassInfo interface utilizing the ASM bytecode library for the info retriaval.
Annotations are lazily gathered, unless required to visit them at the same time as we visit methods and fields.
This implementation guarantees that the method, fields and constructors can be retrieved in the same order as they were in the bytecode
(it can depends of the compiler and might not be the order of the source code - f.e. IBM compiler)
author: Jonas BonŽr author: Alexandre Vasseur |
Method Summary | |
public boolean | equals(Object o) | public List | getAnnotations() Returns the annotations infos. | public static ClassInfo | getArrayClassInfo(String className, ClassLoader loader, ClassInfo componentClassInfo) | public static ClassInfo | getClassInfo(String className, ClassLoader loader) Returns the class info for a specific class. | public static ClassInfo | getClassInfo(byte[] bytecode, ClassLoader loader) Returns the class info for a specific class. | public static ClassInfo | getClassInfo(InputStream stream, ClassLoader loader) Returns the class info for a specific class. | public static ClassInfo | getClassInfo(InputStream stream, ClassLoader loader, boolean lazyAttributes) Returns the class info for a specific class. | public ClassLoader | getClassLoader() Returns the class loader that loaded this class. | public ClassInfo | getComponentType() Returns the component type if array type else null. | public ConstructorInfo | getConstructor(int hash) Returns a constructor info by its hash. | public ConstructorInfo[] | getConstructors() Returns a list with all the constructors info. | public FieldInfo | getField(int hash) Returns a field info by its hash. | public FieldInfo[] | getFields() Returns a list with all the field info. | public ClassInfo[] | getInterfaces() Returns the interfaces. | public MethodInfo | getMethod(int hash) Returns a method info by its hash. | public MethodInfo[] | getMethods() Returns a list with all the methods info. | public int | getModifiers() Returns the class modifiers. | public String | getName() Returns the name of the class. | public static Class | getPrimitiveClass(String className) Checks if the class is a of a primitive type, if so create and return the class for the type else return null. | public String | getSignature() Returns the signature for the class. | public ClassInfo | getSuperclass() Returns the super class. | public boolean | hasStaticInitializer() Checks if the class has a static initalizer. | public int | hashCode() | public boolean | isArray() Is the class an array type. | public boolean | isInterface() Is the class an interface. | public boolean | isPrimitive() Is the class a primitive type. | public static void | markDirty(String className, ClassLoader loader) Marks the class as dirty (since it has been modified and needs to be rebuild). | public static ClassInfo | newClassInfo(byte[] bytecode, ClassLoader loader) Returns a completely new class info for a specific class. | public static String | retrieveClassNameFromBytecode(byte[] bytecode) Retrieves the class name from the bytecode of a class. | public StaticInitializationInfo | staticInitializer() | public String | toString() |
EMPTY_LIST | final protected static List EMPTY_LIST(Code) | | |
EMPTY_STRING_ARRAY | final protected static String[] EMPTY_STRING_ARRAY(Code) | | |
AsmClassInfo | AsmClassInfo(byte[] bytecode, ClassLoader loader, boolean lazyAttributes)(Code) | | Creates a new ClassInfo instance.
Parameters: bytecode - Parameters: loader - |
AsmClassInfo | AsmClassInfo(InputStream resourceStream, ClassLoader loader)(Code) | | Creates a new ClassInfo instance.
Parameters: resourceStream - Parameters: loader - |
AsmClassInfo | AsmClassInfo(String className, ClassLoader loader, ClassInfo componentInfo)(Code) | | Create a ClassInfo based on a component type and a given dimension Due to java.lang.reflect. behavior, the
ClassInfo is almost empty. It is not an interface, only subclass of java.lang.Object, no methods, fields, or
constructor, no annotation.
Parameters: className - Parameters: loader - Parameters: componentInfo - |
getAnnotations | public List getAnnotations()(Code) | | Returns the annotations infos.
the annotations infos |
getArrayClassInfo | public static ClassInfo getArrayClassInfo(String className, ClassLoader loader, ClassInfo componentClassInfo)(Code) | | Create a ClassInfo based on a component type which can be himself an array
Parameters: className - Parameters: loader - Parameters: componentClassInfo - |
getClassInfo | public static ClassInfo getClassInfo(String className, ClassLoader loader)(Code) | | Returns the class info for a specific class.
Parameters: className - Parameters: loader - the class info |
getClassInfo | public static ClassInfo getClassInfo(byte[] bytecode, ClassLoader loader)(Code) | | Returns the class info for a specific class.
Parameters: bytecode - Parameters: loader - the class info |
getClassInfo | public static ClassInfo getClassInfo(InputStream stream, ClassLoader loader)(Code) | | Returns the class info for a specific class.
Parameters: stream - Parameters: loader - the class info |
getClassInfo | public static ClassInfo getClassInfo(InputStream stream, ClassLoader loader, boolean lazyAttributes)(Code) | | Returns the class info for a specific class.
Parameters: stream - Parameters: loader - Parameters: lazyAttributes - the class info |
getClassLoader | public ClassLoader getClassLoader()(Code) | | Returns the class loader that loaded this class.
the class loader |
getComponentType | public ClassInfo getComponentType()(Code) | | Returns the component type if array type else null.
the component type |
getConstructor | public ConstructorInfo getConstructor(int hash)(Code) | | Returns a constructor info by its hash.
Parameters: hash - |
getConstructors | public ConstructorInfo[] getConstructors()(Code) | | Returns a list with all the constructors info.
the constructors info |
getField | public FieldInfo getField(int hash)(Code) | | Returns a field info by its hash.
Parameters: hash - |
getFields | public FieldInfo[] getFields()(Code) | | Returns a list with all the field info.
the field info |
getInterfaces | public ClassInfo[] getInterfaces()(Code) | | Returns the interfaces.
the interfaces |
getMethod | public MethodInfo getMethod(int hash)(Code) | | Returns a method info by its hash.
Parameters: hash - |
getMethods | public MethodInfo[] getMethods()(Code) | | Returns a list with all the methods info.
the methods info |
getModifiers | public int getModifiers()(Code) | | Returns the class modifiers.
the class modifiers |
getName | public String getName()(Code) | | Returns the name of the class.
the name of the class |
getPrimitiveClass | public static Class getPrimitiveClass(String className)(Code) | | Checks if the class is a of a primitive type, if so create and return the class for the type else return null.
Parameters: className - the class for the primitive type or null |
getSignature | public String getSignature()(Code) | | Returns the signature for the class.
the signature for the class |
getSuperclass | public ClassInfo getSuperclass()(Code) | | Returns the super class.
the super class |
hasStaticInitializer | public boolean hasStaticInitializer()(Code) | | Checks if the class has a static initalizer.
|
isArray | public boolean isArray()(Code) | | Is the class an array type.
|
isInterface | public boolean isInterface()(Code) | | Is the class an interface.
|
isPrimitive | public boolean isPrimitive()(Code) | | Is the class a primitive type.
|
markDirty | public static void markDirty(String className, ClassLoader loader)(Code) | | Marks the class as dirty (since it has been modified and needs to be rebuild).
Parameters: className - |
newClassInfo | public static ClassInfo newClassInfo(byte[] bytecode, ClassLoader loader)(Code) | | Returns a completely new class info for a specific class. Does not cache.
Parameters: bytecode - Parameters: loader - the class info |
retrieveClassNameFromBytecode | public static String retrieveClassNameFromBytecode(byte[] bytecode)(Code) | | Retrieves the class name from the bytecode of a class.
Parameters: bytecode - the class name |
|
|