- java.lang.Object
-
- com.ibm.dtfj.java.javacore.JCJavaClass
-
-
Field Summary
-
Fields declared in interface com.ibm.dtfj.java.JavaClass
MODIFIERS_UNAVAILABLE
-
-
Constructor Summary
Constructors Constructor Description JCJavaClass(JCJavaRuntime javaRuntime, String className)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMethod(JavaMethod method)NON-DTFJ
For internal building purposes only.JavaClassgetComponentType()component type only for arraysintgetModifiers()Return the Java language modifiers for this class.StringgetName()Get the name of the class.JavaObjectgetObject()Instance object of this classJavaClassgetSuperclass()Returning null is permissable for cases like Object, primitives, interfaces, etc..StringinternalGetName()NON-DTFJ
For internal building purposes only.booleanisArray()Same as the J9 System Core implementation for DTFJ.voidsetClassLoader(JavaClassLoader classLoader)NON-DTFJ
For internal building purposes only.voidsetID(long classID)NON-DTFJ
For internal building purposes only.voidsetJavaObject(JavaObject javaObject)NON-DTFJ
For internal building purposes only.voidsetJavaSuperClass(long superClassID)NON-DTFJ
For internal building purposes only.voidsetModifiers(int modifiers)NON-DTFJ
For internal building purposes only.-
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods declared in interface com.ibm.dtfj.java.JavaClass
equals, getClassLoader, getConstantPoolReferences, getDeclaredFields, getDeclaredMethods, getID, getInstanceSize, getInterfaces, getProtectionDomain, getReferences, hashCode
-
-
-
-
Constructor Detail
-
JCJavaClass
public JCJavaClass(JCJavaRuntime javaRuntime, String className) throws JCInvalidArgumentsException
- Parameters:
javaRuntime-className-- Throws:
JCInvalidArgumentsException
-
-
Method Detail
-
getComponentType
public JavaClass getComponentType() throws CorruptDataException
component type only for arrays- Specified by:
getComponentTypein interfaceJavaClass- Returns:
- a JavaClass representing the component type of this array class
- Throws:
CorruptDataException
-
getModifiers
public int getModifiers() throws CorruptDataExceptionDescription copied from interface:JavaClassReturn the Java language modifiers for this class.The modifiers are defined by the JVM Specification.
Return MODIFIERS_UNAVAILABLE if the modifiers are unavailable. This might be the case if DTFJ is operating against an artefact such as a portable heap dump that does not contain information about a class's modifiers.
Note that, for inner classes, the actual modifiers are returned, not the synthetic modifiers. For instance, a class will never have its 'protected' modifier set, even if the inner class was a protected member, since 'protected' is not a legal modifier for a class file.
- Specified by:
getModifiersin interfaceJavaClass- Returns:
- the modifiers for this class
- Throws:
CorruptDataException- if modifiers not set- See Also:
JavaClass.getModifiers()
-
getName
public String getName() throws CorruptDataException
Description copied from interface:JavaClassGet the name of the class.- Specified by:
getNamein interfaceJavaClass- Returns:
- the name of the class in the form: "full/package/class$innerclass"
- Throws:
CorruptDataException- if class name is not set- See Also:
JavaClass.getName()
-
getObject
public JavaObject getObject() throws CorruptDataException
Instance object of this class- Specified by:
getObjectin interfaceJavaClass- Returns:
- the java.lang.Class object associated with this class
- Throws:
CorruptDataException- if no instance of this class is set- See Also:
JavaClass.getObject()
-
getSuperclass
public JavaClass getSuperclass() throws CorruptDataException
Returning null is permissable for cases like Object, primitives, interfaces, etc..- Specified by:
getSuperclassin interfaceJavaClass- Returns:
- JavaClass of this class's superclass.
- Throws:
CorruptDataException- if super class not found.- See Also:
JavaClass.getSuperclass()
-
isArray
public boolean isArray() throws CorruptDataExceptionSame as the J9 System Core implementation for DTFJ.- Specified by:
isArrayin interfaceJavaClass- Returns:
- true if an array
- Throws:
CorruptDataException- See Also:
JavaClass
-
setID
public void setID(long classID) throws JCInvalidArgumentsExceptionNON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
classID- which is a valid hexadecimal address- Throws:
JCInvalidArgumentsException- if invalid address is passed as an ID
-
internalGetName
public String internalGetName()
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Returns:
- class Name
-
setClassLoader
public void setClassLoader(JavaClassLoader classLoader)
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
classLoader-
-
setJavaSuperClass
public void setJavaSuperClass(long superClassID)
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
superClassID-
-
setJavaObject
public void setJavaObject(JavaObject javaObject)
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
javaObject-
-
setModifiers
public void setModifiers(int modifiers)
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
java- class modifiers
-
addMethod
public void addMethod(JavaMethod method)
NON-DTFJ
For internal building purposes only. Do not call outside the DTFJ implementation.- Parameters:
java- method - a method declared by this class
-
-