com.caucho.bytecode
Class JTypeWrapper

java.lang.Object
  extended by com.caucho.bytecode.JTypeWrapper
All Implemented Interfaces:
JType

public class JTypeWrapper
extends java.lang.Object
implements JType

Wrapper around the java Class for a JClass.


Constructor Summary
JTypeWrapper(JClassLoader loader, java.lang.reflect.ParameterizedType type)
           
JTypeWrapper(java.lang.reflect.ParameterizedType type, java.lang.ClassLoader loader)
           
 
Method Summary
static JType create(java.lang.reflect.Type type, java.lang.ClassLoader loader)
           
 JType[] getActualTypeArguments()
          Returns the actual type arguments.
 JClass getComponentType()
          Returns the component for a class.
 JField[] getDeclaredFields()
          Returns the declared fields
 JMethod[] getDeclaredMethods()
          Returns the declared methods
 JField[] getFields()
          Returns the fields
 JClass[] getInterfaces()
          Returns the interfaces.
 JMethod getMethod(java.lang.String name, JClass[] param)
          Returns the matching method.
 JMethod[] getMethods()
          Returns the public methods
 java.lang.String getName()
          Returns the class name.
 java.lang.String getPrintName()
          Returns the print name.
 JClass getRawType()
          Returns the actual type arguments.
 JClass getSuperClass()
          Returns the superclass.
 boolean isAbstract()
          Returns true for an abstract class
 boolean isArray()
          Returns true for an array class.
 boolean isAssignableFrom(java.lang.Class cl)
          Returns true if the jClass is assignable to the class.
 boolean isAssignableFrom(JClass cl)
          Returns true if the jClass is assignable to the class.
 boolean isAssignableTo(java.lang.Class cl)
          Returns true if the jClass is assignable to the class.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JTypeWrapper

public JTypeWrapper(JClassLoader loader,
                    java.lang.reflect.ParameterizedType type)

JTypeWrapper

public JTypeWrapper(java.lang.reflect.ParameterizedType type,
                    java.lang.ClassLoader loader)
Method Detail

create

public static JType create(java.lang.reflect.Type type,
                           java.lang.ClassLoader loader)

getName

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

Specified by:
getName in interface JType

getPrintName

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

Specified by:
getPrintName in interface JType

getActualTypeArguments

public JType[] getActualTypeArguments()
Returns the actual type arguments.

Specified by:
getActualTypeArguments in interface JType

getRawType

public JClass getRawType()
Returns the actual type arguments.

Specified by:
getRawType in interface JType

isPrimitive

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

Specified by:
isPrimitive in interface JType

isPublic

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

Specified by:
isPublic in interface JType

isAbstract

public boolean isAbstract()
Returns true for an abstract class

Specified by:
isAbstract in interface JType

isFinal

public boolean isFinal()
Returns true for a final class

Specified by:
isFinal in interface JType

isInterface

public boolean isInterface()
Returns true for an interface

Specified by:
isInterface in interface JType

getSuperClass

public JClass getSuperClass()
Returns the superclass.

Specified by:
getSuperClass in interface JType

getInterfaces

public JClass[] getInterfaces()
Returns the interfaces.

Specified by:
getInterfaces in interface JType

isArray

public 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 boolean isAssignableTo(java.lang.Class cl)
Returns true if the jClass is assignable to the class.

Specified by:
isAssignableTo in interface JType

isAssignableFrom

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

Specified by:
isAssignableFrom in interface JType

isAssignableFrom

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

Specified by:
isAssignableFrom in interface JType

getDeclaredMethods

public JMethod[] getDeclaredMethods()
Returns the declared methods

Specified by:
getDeclaredMethods in interface JType

getMethods

public JMethod[] getMethods()
Returns the public methods

Specified by:
getMethods in interface JType

getMethod

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

Specified by:
getMethod in interface JType

getDeclaredFields

public JField[] getDeclaredFields()
Returns the declared fields

Specified by:
getDeclaredFields in interface JType

getFields

public JField[] getFields()
Returns the fields

Specified by:
getFields in interface JType