- 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 void
addMethod(JavaMethod method)
NON-DTFJ
For internal building purposes only.JavaClass
getComponentType()
component type only for arraysint
getModifiers()
Return the Java language modifiers for this class.String
getName()
Get the name of the class.JavaObject
getObject()
Instance object of this classJavaClass
getSuperclass()
Returning null is permissable for cases like Object, primitives, interfaces, etc..String
internalGetName()
NON-DTFJ
For internal building purposes only.boolean
isArray()
Same as the J9 System Core implementation for DTFJ.void
setClassLoader(JavaClassLoader classLoader)
NON-DTFJ
For internal building purposes only.void
setID(long classID)
NON-DTFJ
For internal building purposes only.void
setJavaObject(JavaObject javaObject)
NON-DTFJ
For internal building purposes only.void
setJavaSuperClass(long superClassID)
NON-DTFJ
For internal building purposes only.void
setModifiers(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:
getComponentType
in interfaceJavaClass
- Returns:
- a JavaClass representing the component type of this array class
- Throws:
CorruptDataException
-
getModifiers
public int getModifiers() throws CorruptDataException
Description copied from interface:JavaClass
Return 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:
getModifiers
in 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:JavaClass
Get the name of the class.- Specified by:
getName
in 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:
getObject
in 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:
getSuperclass
in interfaceJavaClass
- Returns:
- JavaClass of this class's superclass.
- Throws:
CorruptDataException
- if super class not found.- See Also:
JavaClass.getSuperclass()
-
isArray
public boolean isArray() throws CorruptDataException
Same as the J9 System Core implementation for DTFJ.- Specified by:
isArray
in interfaceJavaClass
- Returns:
- true if an array
- Throws:
CorruptDataException
- See Also:
JavaClass
-
setID
public void setID(long classID) throws JCInvalidArgumentsException
NON-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
-
-