koala.dynamicjava.classinfo
Class JavaClassInfo

java.lang.Object
  extended bykoala.dynamicjava.classinfo.JavaClassInfo
All Implemented Interfaces:
ClassInfo

public class JavaClassInfo
extends java.lang.Object
implements ClassInfo

The instances of this class provides informations about class compiled to JVM bytecode.


Field Summary
static JavaClassInfo BOOLEAN
          The boolean info
static JavaClassInfo CLASS
          The Class info
static JavaClassInfo DOUBLE
          The double info
static JavaClassInfo FLOAT
          The float info
static JavaClassInfo INT
          The int info
static JavaClassInfo LONG
          The long info
static JavaClassInfo STRING
          The string info
 
Constructor Summary
JavaClassInfo(java.lang.Class c)
          Creates a new class info
JavaClassInfo(JavaClassInfo c)
          Creates a new class info representing an array
 
Method Summary
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one
 ClassInfo getAnonymousDeclaringClass()
          Returns the declaring class of an anonymous class or null
 ClassInfo getArrayType()
          Returns the array type that contains elements of this class
 ClassInfo getComponentType()
          Returns the component type of this array type
 ConstructorInfo[] getConstructors()
          Returns the constructor infos for the current class
 ClassInfo[] getDeclaredClasses()
          Returns the classes and interfaces declared as members of the class represented by this ClassInfo object.
 ClassInfo getDeclaringClass()
          Returns the declaring class or null
 FieldInfo[] getFields()
          Returns the field infos for the current class
 ClassInfo[] getInterfaces()
          Returns the class infos of the interfaces implemented by the class this info represents
 java.lang.Class getJavaClass()
          Returns the underlying class
 MethodInfo[] getMethods()
          Returns the method infos for the current class
 int getModifiers()
          Returns the modifiers flags
 java.lang.String getName()
          Returns the fully qualified name of the underlying class
 ClassInfo getSuperclass()
          Returns the class info of the superclass of the class represented by this info
 boolean isArray()
          Whether this object represents an array
 boolean isCompilable()
          Whether the underlying class needs compilation
 boolean isInterface()
          Whether this object represents an interface
 boolean isPrimitive()
          Whether this object represents a primitive type
 void setCompilable(boolean b)
          Sets the compilable property
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOOLEAN

public static final JavaClassInfo BOOLEAN
The boolean info


INT

public static final JavaClassInfo INT
The int info


LONG

public static final JavaClassInfo LONG
The long info


FLOAT

public static final JavaClassInfo FLOAT
The float info


DOUBLE

public static final JavaClassInfo DOUBLE
The double info


STRING

public static final JavaClassInfo STRING
The string info


CLASS

public static final JavaClassInfo CLASS
The Class info

Constructor Detail

JavaClassInfo

public JavaClassInfo(java.lang.Class c)
Creates a new class info

Parameters:
c - the java class

JavaClassInfo

public JavaClassInfo(JavaClassInfo c)
Creates a new class info representing an array

Parameters:
c - the java class
Method Detail

getJavaClass

public java.lang.Class getJavaClass()
Returns the underlying class

Specified by:
getJavaClass in interface ClassInfo

isCompilable

public boolean isCompilable()
Whether the underlying class needs compilation

Specified by:
isCompilable in interface ClassInfo

setCompilable

public void setCompilable(boolean b)
Sets the compilable property

Specified by:
setCompilable in interface ClassInfo

getDeclaringClass

public ClassInfo getDeclaringClass()
Returns the declaring class or null

Specified by:
getDeclaringClass in interface ClassInfo

getAnonymousDeclaringClass

public ClassInfo getAnonymousDeclaringClass()
Returns the declaring class of an anonymous class or null

Specified by:
getAnonymousDeclaringClass in interface ClassInfo

getModifiers

public int getModifiers()
Returns the modifiers flags

Specified by:
getModifiers in interface ClassInfo

getName

public java.lang.String getName()
Returns the fully qualified name of the underlying class

Specified by:
getName in interface ClassInfo

getSuperclass

public ClassInfo getSuperclass()
Returns the class info of the superclass of the class represented by this info

Specified by:
getSuperclass in interface ClassInfo

getInterfaces

public ClassInfo[] getInterfaces()
Returns the class infos of the interfaces implemented by the class this info represents

Specified by:
getInterfaces in interface ClassInfo

getFields

public FieldInfo[] getFields()
Returns the field infos for the current class

Specified by:
getFields in interface ClassInfo

getConstructors

public ConstructorInfo[] getConstructors()
Returns the constructor infos for the current class

Specified by:
getConstructors in interface ClassInfo

getMethods

public MethodInfo[] getMethods()
Returns the method infos for the current class

Specified by:
getMethods in interface ClassInfo

getDeclaredClasses

public ClassInfo[] getDeclaredClasses()
Returns the classes and interfaces declared as members of the class represented by this ClassInfo object.

Specified by:
getDeclaredClasses in interface ClassInfo

getArrayType

public ClassInfo getArrayType()
Returns the array type that contains elements of this class

Specified by:
getArrayType in interface ClassInfo

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one


isInterface

public boolean isInterface()
Whether this object represents an interface

Specified by:
isInterface in interface ClassInfo

isArray

public boolean isArray()
Whether this object represents an array

Specified by:
isArray in interface ClassInfo

isPrimitive

public boolean isPrimitive()
Whether this object represents a primitive type

Specified by:
isPrimitive in interface ClassInfo

getComponentType

public ClassInfo getComponentType()
Returns the component type of this array type

Specified by:
getComponentType in interface ClassInfo
Throws:
java.lang.IllegalStateException - if this type do not represent an array


Copyright © 2001 Stephane Hillion. All Rights Reserved.