Class JClassType

public class JClassType
extends JType
implements HasMetaData

Constructors

JClassType(TypeOracle, CompilationUnitProvider, JPackage, JClassType, String, int, int, int, int, boolean)

Methods

addImplementedInterface(JClassType)
addMetaData(String, String[])Adds additional metadata.
addModifierBits(int)
findConstructor(JType[])
findField(String)
findMethod(String, JType[])
findNestedType(String)
getBodyEnd()
getBodyStart()
getCompilationUnit()
getConstructor(JType[])
getConstructors()
getEnclosingType()
getField(String)
getFields()
getImplementedInterfaces()
getJNISignature()
getMetaData(String)Gets each list of metadata for the specified tag name.
getMetaDataTags()Gets the name of available metadata tags.
getMethod(String, JType[])
getMethods()
getModifierBits()
getName()
getNestedType(String)
getNestedTypes()
getOracle()
getOverloads(String)
getPackage()
getQualifiedSourceName()
getSimpleSourceName()
getSubtypes()
getSuperclass()
getTypeHash()
isAbstract()
isArray()
isAssignableTo(JClassType)
isClass()
isDefaultInstantiable()Determines if the class can be constructed using a simple new operation.
isInterface()
isParameterized()
isPrimitive()
isPrivate()
isProtected()
isPublic()
isStatic()
setSuperclass(JClassType)
toString()

Constructor Detail

JClassType

public JClassType(TypeOracle oracle, CompilationUnitProvider cup, JPackage declaringPackage, JClassType enclosingType, String name, int declStart, int declEnd, int bodyStart, int bodyEnd, boolean isInterface)

Parameters

oracle
cup
declaringPackage
enclosingType
name
declStart
declEnd
bodyStart
bodyEnd
isInterface

Method Detail

addImplementedInterface

public void addImplementedInterface(JClassType intf)

Parameters

intf

addMetaData

public void addMetaData(String tagName, String[] values)
Adds additional metadata.

Parameters

tagName
values

addModifierBits

public void addModifierBits(int bits)

Parameters

bits

findConstructor

public JConstructor findConstructor(JType[] paramTypes)

Parameters

paramTypes

findField

public JField findField(String name)

Parameters

name

findMethod

public JMethod findMethod(String name, JType[] paramTypes)

Parameters

name
paramTypes

findNestedType

public JClassType findNestedType(String typeName)

Parameters

typeName

getBodyEnd

public int getBodyEnd()

getBodyStart

public int getBodyStart()

getCompilationUnit

public CompilationUnitProvider getCompilationUnit()

getConstructor

public JConstructor getConstructor(JType[] paramTypes)
     throws NotFoundException

Parameters

paramTypes

getConstructors

public JConstructor[] getConstructors()

getEnclosingType

public JClassType getEnclosingType()

getField

public JField getField(String name)

Parameters

name

getFields

public JField[] getFields()

getImplementedInterfaces

public JClassType[] getImplementedInterfaces()

getJNISignature

public abstract String getJNISignature()

getMetaData

public String[][] getMetaData(String tagName)
Gets each list of metadata for the specified tag name.

Parameters

tagName

getMetaDataTags

public String[] getMetaDataTags()
Gets the name of available metadata tags.

getMethod

public JMethod getMethod(String name, JType[] paramTypes)
     throws NotFoundException

Parameters

name
paramTypes

getMethods

public JMethod[] getMethods()

getModifierBits

protected int getModifierBits()

getName

public String getName()

getNestedType

public JClassType getNestedType(String typeName)
     throws NotFoundException

Parameters

typeName

getNestedTypes

public JClassType[] getNestedTypes()

getOracle

public TypeOracle getOracle()

getOverloads

public JMethod[] getOverloads(String name)

Parameters

name

getPackage

public JPackage getPackage()

getQualifiedSourceName

public abstract String getQualifiedSourceName()

getSimpleSourceName

public abstract String getSimpleSourceName()

getSubtypes

public JClassType[] getSubtypes()

getSuperclass

public JClassType getSuperclass()

getTypeHash

public String getTypeHash()
     throws UnableToCompleteException

isAbstract

public boolean isAbstract()

isArray

public abstract JArrayType isArray()

isAssignableTo

public boolean isAssignableTo(JClassType possibleSupertype)

Parameters

possibleSupertype

isClass

public abstract JClassType isClass()

isDefaultInstantiable

public boolean isDefaultInstantiable()
Determines if the class can be constructed using a simple new operation. Specifically, the class must

Return Value

true if the type is default instantiable, or false otherwise

isInterface

public abstract JClassType isInterface()

isParameterized

public abstract JParameterizedType isParameterized()

isPrimitive

public abstract JPrimitiveType isPrimitive()

isPrivate

public boolean isPrivate()

isProtected

public boolean isProtected()

isPublic

public boolean isPublic()

isStatic

public boolean isStatic()

setSuperclass

public void setSuperclass(JClassType type)

Parameters

type

toString

public String toString()