DynamicJava Javadoc: Class TreeClassInfo

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## koala.dynamicjava.classinfo
Class TreeClassInfo

    java.lang.Object
      |
      +--koala.dynamicjava.classinfo.TreeClassInfo

All Implemented Interfaces:
  ClassInfo

public class TreeClassInfo
extends java.lang.Object
implements ClassInfo

The instances of this class provides informations about classes not yet compiled to JVM bytecode and represented by a syntax tree

Field Summary
`static java.lang.String` | `ANONYMOUS_DECLARING_CLASS` The declaringClass property is defined for each anonymous inner class/interface declaration It contains a TypeDeclaration

Constructor Summary
`TreeClassInfo(TreeClassInfo ci)` Creates a new array class info
`TreeClassInfo(TypeDeclaration cd, ClassFinder cf)` Creates a new class info

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
`ClassFinder` | `getClassFinder()` Returns the class finder
`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` | `getField(FieldDeclaration node)` Returns the field represented by the given node
`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` | `getMethod(MethodDeclaration node)` Returns the method represented by the given node
`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 class
`TypeDeclaration` | `getTypeDeclaration()` Returns the abstract syntax tree
`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

### ANONYMOUS_DECLARING_CLASS

    public static final java.lang.String ANONYMOUS_DECLARING_CLASS

  The declaringClass property is defined for each anonymous inner class/interface declaration It contains a TypeDeclaration

Constructor Detail

### TreeClassInfo

    public TreeClassInfo(TypeDeclaration cd,
                         ClassFinder cf)

  Creates a new class info
  Parameters:
    `cd` - the class declaration
    `cf` - the class finder

### TreeClassInfo

    public TreeClassInfo(TreeClassInfo ci)

  Creates a new array class info
  Parameters:
    `ci` - the class info

Method Detail

### getJavaClass

    public java.lang.Class getJavaClass()

  Returns the underlying class
  Specified by:
    `getJavaClass` in interface `ClassInfo`

### getTypeDeclaration

    public TypeDeclaration getTypeDeclaration()

  Returns the abstract syntax tree

### getClassFinder

    public ClassFinder getClassFinder()

  Returns the class finder

### 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 class
  Specified by:
    `getSuperclass` in interface `ClassInfo`
  Throws:
    `NoClassDefFoundError` - if the class cannot be loaded

### getInterfaces

    public ClassInfo[] getInterfaces()

  Returns the class infos of the interfaces implemented by the class this info represents
  Specified by:
    `getInterfaces` in interface `ClassInfo`
  Throws:
    `NoClassDefFoundError` - if an interface cannot be loaded

### getField

    public FieldInfo getField(FieldDeclaration node)

  Returns the field represented by the given node
  Parameters:
    `node` - the node that represents the field

### 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`

### getMethod

    public MethodInfo getMethod(MethodDeclaration node)

  Returns the method represented by the given node
  Parameters:
    `node` - the node that represents the method

### 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`

### 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

### equals

    public boolean equals(java.lang.Object obj)

  Indicates whether some other object is "equal to" this one
  Overrides:
    `equals` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Stephane Hillion. All Rights Reserved.