Constructor | Description |
---|---|
ClassData(String name) |
Constructs the empty ClassData, suited for regular class.
|
ClassData(String arrayKlass,
String componentKlass,
int length) |
Constructs the empty ClassData, suited for arrays.
|
Modifier and Type | Method | Description |
---|---|---|
void |
addField(FieldData fieldData) |
Add the field data.
|
void |
addSuperClass(String superClass) |
Add the super-class into the hierarchy.
|
void |
addSuperClassData(Class superClass) |
Add the super-class data of the class.
|
String |
arrayClass() |
Answer the array class for this class data.
|
String |
arrayComponentType() |
Answer the array component class for this class data.
|
long |
arrayLength() |
Answer the array length for this class data.
|
List<String> |
classHierarchy() |
Get the class names in the hierarchy,
starting from the superclasses down to subclasses
|
boolean |
equals(Object o) |
|
Collection<FieldData> |
fields() |
Get the fields' data, including all the fields
in the hierarchy.
|
Collection<FieldData> |
fieldsFor(String klass) |
Get the fields' data for the given class.
|
int |
hashCode() |
|
Object |
instance() |
|
boolean |
isArray() |
Is this class data for the array?
|
boolean |
isContended() |
Does the class have @Contended annotation?
|
void |
merge(ClassData superClassData) |
Merge this class data with the super-class class data
|
String |
name() |
Answer class name
|
int |
oopsCount() |
Returns the count of the oops in th class
|
Collection<FieldData> |
ownFields() |
Get the fields' of the own fields.
|
static ClassData |
parseClass(Class klass) |
Parse the existing class.
|
static ClassData |
parseInstance(Object o) |
Parse the existing instance.
|
ClassData |
superClass() |
Get ClassData of the super-class.
|
public ClassData(String name)
public static ClassData parseInstance(Object o)
o
- object instance to parsepublic static ClassData parseClass(Class klass)
klass
- class to parsepublic void addSuperClass(String superClass)
superClass
- super class namepublic void addSuperClassData(Class superClass)
superClass
- super classpublic void addField(FieldData fieldData)
fieldData
- the data to addpublic Collection<FieldData> fields()
public Collection<FieldData> ownFields()
public int oopsCount()
public Collection<FieldData> fieldsFor(String klass)
klass
- class namepublic List<String> classHierarchy()
public String name()
public boolean isArray()
public ClassData superClass()
public boolean isContended()
public String arrayClass()
public String arrayComponentType()
public long arrayLength()
public void merge(ClassData superClassData)
superClassData
- super class datapublic Object instance()
Copyright © 2017. All Rights Reserved.