com.caucho.bytecode
Class JClassWrapper

java.lang.Object
  extended by com.caucho.bytecode.JAnnotationObject
      extended by com.caucho.bytecode.JClass
          extended by com.caucho.bytecode.JClassWrapper
All Implemented Interfaces:
JType

public class JClassWrapper
extends JClass

Wrapper around the java Class for a JClass.


Field Summary
 
Fields inherited from class com.caucho.bytecode.JClass
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, OBJECT, SHORT, STRING, VOID
 
Constructor Summary
JClassWrapper(java.lang.Class cl, JClassLoader loader)
           
 
Method Summary
static JClassWrapper create(java.lang.Class cl)
           
 JAnnotation getAnnotation(java.lang.String name)
          Returns the annotation.
 JClassLoader getClassLoader()
          Returns the loader.
 JClass getComponentType()
          Returns the component type for a primitive class.
 JMethod[] getConstructors()
          Returns the public constructors.
 JAnnotation[] getDeclaredAnnotations()
          Returns the annotation.
 JField[] getDeclaredFields()
          Returns the declared methods.
 JMethod[] getDeclaredMethods()
          Returns the declared methods.
 JField[] getFields()
          Returns the declared methods.
 JClass[] getInterfaces()
          Returns the superclass
 java.lang.Class getJavaClass()
          Returns the Java class.
 JMethod getMethod(java.lang.String name, JClass[] types)
          Returns the matching methods.
 JMethod[] getMethods()
          Returns the public methods.
 java.lang.String getName()
          Returns the class name.
 JClass getSuperClass()
          Returns the superclass
 java.lang.Class getWrappedClass()
          Returns the class.
 boolean isAbstract()
          Returns true for an abstract class
 boolean isArray()
          Returns true for a primitive class.
 boolean isAssignableFrom(java.lang.Class cl)
          Returns true for assignability.
 boolean isAssignableFrom(JClass cl)
          Returns true for assignability.
 boolean isAssignableTo(java.lang.Class cl)
          Returns true for assignability.
 boolean isFinal()
          Returns true for a final class
 boolean isInterface()
          Returns true for an interface
 boolean isPrimitive()
          Returns true for a primitive class.
 boolean isPublic()
          Returns true for a public class.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.bytecode.JClass
equals, getActualTypeArguments, getConstructor, getPrintName, getRawType, getShortName, getSimpleName, hashCode
 
Methods inherited from class com.caucho.bytecode.JAnnotationObject
getAnnotation, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JClassWrapper

public JClassWrapper(java.lang.Class cl,
                     JClassLoader loader)
Method Detail

create

public static JClassWrapper create(java.lang.Class cl)

getName

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

Specified by:
getName in interface JType
Specified by:
getName in class JClass

getJavaClass

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

Overrides:
getJavaClass in class JClass

getWrappedClass

public java.lang.Class getWrappedClass()
Returns the class.


getClassLoader

public JClassLoader getClassLoader()
Returns the loader.


isPrimitive

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

Specified by:
isPrimitive in interface JType
Specified by:
isPrimitive in class JClass

isArray

public boolean isArray()
Returns true for a primitive class.

Specified by:
isArray in interface JType
Specified by:
isArray in class JClass

getComponentType

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

Specified by:
getComponentType in interface JType
Overrides:
getComponentType in class JClass

isPublic

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

Specified by:
isPublic in interface JType
Specified by:
isPublic in class JClass

isAbstract

public boolean isAbstract()
Returns true for an abstract class

Specified by:
isAbstract in interface JType
Specified by:
isAbstract in class JClass

isFinal

public boolean isFinal()
Returns true for a final class

Specified by:
isFinal in interface JType
Specified by:
isFinal in class JClass

isInterface

public boolean isInterface()
Returns true for an interface

Specified by:
isInterface in interface JType
Specified by:
isInterface in class JClass

isAssignableTo

public boolean isAssignableTo(java.lang.Class cl)
Returns true for assignability.

Specified by:
isAssignableTo in interface JType
Specified by:
isAssignableTo in class JClass

isAssignableFrom

public boolean isAssignableFrom(java.lang.Class cl)
Returns true for assignability.

Specified by:
isAssignableFrom in interface JType
Specified by:
isAssignableFrom in class JClass

isAssignableFrom

public boolean isAssignableFrom(JClass cl)
Returns true for assignability.

Specified by:
isAssignableFrom in interface JType
Specified by:
isAssignableFrom in class JClass

getSuperClass

public JClass getSuperClass()
Returns the superclass

Specified by:
getSuperClass in interface JType
Specified by:
getSuperClass in class JClass

getInterfaces

public JClass[] getInterfaces()
Returns the superclass

Specified by:
getInterfaces in interface JType
Specified by:
getInterfaces in class JClass

getDeclaredMethods

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

Specified by:
getDeclaredMethods in interface JType
Specified by:
getDeclaredMethods in class JClass

getMethods

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

Specified by:
getMethods in interface JType
Specified by:
getMethods in class JClass

getMethod

public JMethod getMethod(java.lang.String name,
                         JClass[] types)
Returns the matching methods.

Specified by:
getMethod in interface JType
Specified by:
getMethod in class JClass

getConstructors

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

Specified by:
getConstructors in class JClass

getDeclaredFields

public JField[] getDeclaredFields()
Returns the declared methods.

Specified by:
getDeclaredFields in interface JType
Specified by:
getDeclaredFields in class JClass

getFields

public JField[] getFields()
Returns the declared methods.

Specified by:
getFields in interface JType
Specified by:
getFields in class JClass

getAnnotation

public JAnnotation getAnnotation(java.lang.String name)
Returns the annotation.

Overrides:
getAnnotation in class JAnnotationObject

getDeclaredAnnotations

public JAnnotation[] getDeclaredAnnotations()
Returns the annotation.

Overrides:
getDeclaredAnnotations in class JAnnotationObject

toString

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