org.codehaus.aspectwerkz.reflect.impl.java
Class JavaClassInfo

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

public class JavaClassInfo
extends Object
implements ClassInfo

Implementation of the ClassInfo interface for java.lang.reflect.*.

Author:
Jonas Bonér

Nested Class Summary
 
Nested classes inherited from class org.codehaus.aspectwerkz.reflect.ClassInfo
ClassInfo.NullClassInfo
 
Method Summary
static String convertJavaArrayTypeNameToHumanTypeName(String typeName)
          Converts an internal Java array type name ([Lblabla) to the a the format used by the expression matcher (blabla[])
 boolean equals(Object o)
           
 List getAnnotations()
          Returns the annotations infos.
static ClassInfo getClassInfo(Class clazz)
          Returns the class info for a specific class.
 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.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getClassInfo

public static ClassInfo getClassInfo(Class clazz)
Returns the class info for a specific class.

Returns:
the class info

getAnnotations

public List getAnnotations()
Returns the annotations infos.

Specified by:
getAnnotations in interface ReflectionInfo
Returns:
the annotations infos

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:

convertJavaArrayTypeNameToHumanTypeName

public static String convertJavaArrayTypeNameToHumanTypeName(String typeName)
Converts an internal Java array type name ([Lblabla) to the a the format used by the expression matcher (blabla[])

Parameters:
typeName - is type name
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.