com.caucho.bytecode
Class JClass

java.lang.Object
  extended by com.caucho.bytecode.JAnnotationObject
      extended by com.caucho.bytecode.JClass
All Implemented Interfaces:
JType
Direct Known Subclasses:
JavaClass, JClassArray, JClassWrapper

public abstract class JClass
extends JAnnotationObject
implements JType

Represents an introspected java class.


Field Summary
static JClass BOOLEAN
           
static JClass BYTE
           
static JClass CHAR
           
static JClass DOUBLE
           
static JClass FLOAT
           
static JClass INT
           
static JClass LONG
           
static JClass OBJECT
           
static JClass SHORT
           
static JClass STRING
           
static JClass VOID
           
 
Constructor Summary
JClass()
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Returns true if equals.
 JType[] getActualTypeArguments()
          Returns the parameter types.
 JClass getComponentType()
          Returns the component for a class.
 JMethod getConstructor(JClass[] param)
          Returns a matching constructor.
abstract  JMethod[] getConstructors()
          Returns the constructors.
abstract  JField[] getDeclaredFields()
          Returns the declared fields
abstract  JMethod[] getDeclaredMethods()
          Returns the declared methods
abstract  JField[] getFields()
          Returns the fields
abstract  JClass[] getInterfaces()
          Returns the interfaces.
 java.lang.Class getJavaClass()
          Returns the Java class.
abstract  JMethod getMethod(java.lang.String name, JClass[] param)
          Returns the matching method.
abstract  JMethod[] getMethods()
          Returns the public methods
abstract  java.lang.String getName()
          Returns the class name.
 java.lang.String getPrintName()
          Returns the printable name.
 JClass getRawType()
          Returns the raw type.
 java.lang.String getShortName()
          Returns a printable version of a class.
 java.lang.String getSimpleName()
          Returns the class name.
abstract  JClass getSuperClass()
          Returns the superclass.
 int hashCode()
          Returns the hash code
abstract  boolean isAbstract()
          Returns true for an abstract class
abstract  boolean isArray()
          Returns true for an array class.
abstract  boolean isAssignableFrom(java.lang.Class cl)
          Returns true if the jClass is assignable to the class.
abstract  boolean isAssignableFrom(JClass cl)
          Returns true if the jClass is assignable to the class.
abstract  boolean isAssignableTo(java.lang.Class cl)
          Returns true if the jClass is assignable to the class.
abstract  boolean isFinal()
          Returns true for a final class
abstract  boolean isInterface()
          Returns true for an interface
abstract  boolean isPrimitive()
          Returns true for a primitive class.
abstract  boolean isPublic()
          Returns true for a public class.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.bytecode.JAnnotationObject
getAnnotation, getAnnotation, getDeclaredAnnotations, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VOID

public static final JClass VOID

BOOLEAN

public static final JClass BOOLEAN

BYTE

public static final JClass BYTE

SHORT

public static final JClass SHORT

INT

public static final JClass INT

LONG

public static final JClass LONG

FLOAT

public static final JClass FLOAT

DOUBLE

public static final JClass DOUBLE

CHAR

public static final JClass CHAR

STRING

public static final JClass STRING

OBJECT

public static final JClass OBJECT
Constructor Detail

JClass

public JClass()
Method Detail

getName

public abstract java.lang.String getName()
Returns the class name.

Specified by:
getName in interface JType

getSimpleName

public java.lang.String getSimpleName()
Returns the class name.


getJavaClass

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


getActualTypeArguments

public JType[] getActualTypeArguments()
Returns the parameter types.

Specified by:
getActualTypeArguments in interface JType

getRawType

public JClass getRawType()
Returns the raw type.

Specified by:
getRawType in interface JType

isPrimitive

public abstract boolean isPrimitive()
Returns true for a primitive class.

Specified by:
isPrimitive in interface JType

isPublic

public abstract boolean isPublic()
Returns true for a public class.

Specified by:
isPublic in interface JType

isAbstract

public abstract boolean isAbstract()
Returns true for an abstract class

Specified by:
isAbstract in interface JType

isFinal

public abstract boolean isFinal()
Returns true for a final class

Specified by:
isFinal in interface JType

isInterface

public abstract boolean isInterface()
Returns true for an interface

Specified by:
isInterface in interface JType

getSuperClass

public abstract JClass getSuperClass()
Returns the superclass.

Specified by:
getSuperClass in interface JType

getInterfaces

public abstract JClass[] getInterfaces()
Returns the interfaces.

Specified by:
getInterfaces in interface JType

isArray

public abstract boolean isArray()
Returns true for an array class.

Specified by:
isArray in interface JType

getComponentType

public JClass getComponentType()
Returns the component for a class.

Specified by:
getComponentType in interface JType

isAssignableTo

public abstract boolean isAssignableTo(java.lang.Class cl)
Returns true if the jClass is assignable to the class.

Specified by:
isAssignableTo in interface JType

isAssignableFrom

public abstract boolean isAssignableFrom(java.lang.Class cl)
Returns true if the jClass is assignable to the class.

Specified by:
isAssignableFrom in interface JType

isAssignableFrom

public abstract boolean isAssignableFrom(JClass cl)
Returns true if the jClass is assignable to the class.

Specified by:
isAssignableFrom in interface JType

getDeclaredMethods

public abstract JMethod[] getDeclaredMethods()
Returns the declared methods

Specified by:
getDeclaredMethods in interface JType

getMethods

public abstract JMethod[] getMethods()
Returns the public methods

Specified by:
getMethods in interface JType

getConstructors

public abstract JMethod[] getConstructors()
Returns the constructors.


getConstructor

public JMethod getConstructor(JClass[] param)
Returns a matching constructor.


getMethod

public abstract JMethod getMethod(java.lang.String name,
                                  JClass[] param)
Returns the matching method.

Specified by:
getMethod in interface JType

getDeclaredFields

public abstract JField[] getDeclaredFields()
Returns the declared fields

Specified by:
getDeclaredFields in interface JType

getFields

public abstract JField[] getFields()
Returns the fields

Specified by:
getFields in interface JType

getPrintName

public java.lang.String getPrintName()
Returns the printable name.

Specified by:
getPrintName in interface JType

getShortName

public java.lang.String getShortName()
Returns a printable version of a class.


hashCode

public int hashCode()
Returns the hash code

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Returns true if equals.

Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object