public class ClassFieldDescription extends Object implements Iterable<ClassFieldDescription>
| Modifier and Type | Field and Description |
|---|---|
static int |
maxRecursionLevel
maximum recursion depth that is being explored default is 10: anything beyond that is typically an indication if
infinite recursion
|
| Modifier | Constructor and Description |
|---|---|
|
ClassFieldDescription(Class<?> referenceClass,
boolean fullScan)
This should be called only once with the root class as an argument
|
protected |
ClassFieldDescription(Class<?> referenceClass,
Field field,
ClassFieldDescription parent,
int recursionLevel) |
|
ClassFieldDescription(Field field,
ClassFieldDescription parent,
int recursionLevel,
boolean fullScan)
This should be called for individual class field members
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorpublic static int maxRecursionLevel
public ClassFieldDescription(Class<?> referenceClass, boolean fullScan)
referenceClass - the root node containing further Field childrenfullScan - true if the class field should be serialised according to Serializable
(ie. object's non-static and non-transient fields); false otherwise.protected ClassFieldDescription(Class<?> referenceClass, Field field, ClassFieldDescription parent, int recursionLevel)
public ClassFieldDescription(Field field, ClassFieldDescription parent, int recursionLevel, boolean fullScan)
field - Field reference for the given class memberparent - pointer to the root/parent reference class field descriptionrecursionLevel - hierarchy level (i.e. '0' being the root class, '1' the sub-class etc.fullScan - true if the class field should be serialised according to Serializable
(ie. object's non-static and non-transient fields); false otherwise.protected Object allocateMemberClassField(Object fieldParent, ClassFieldDescription localParent) throws IllegalAccessException
IllegalAccessExceptionpublic List<String> getActualTypeArgumentNames()
public List<Class<?>> getActualTypeArguments()
public List<ClassFieldDescription> getChildren()
public DataType getDataType()
DataType.OTHER in all
other casespublic Field getField()
null if it's a root nodepublic Map<String,ClassFieldDescription> getFieldMap()
public String getFieldName()
public String getFieldNameRelative()
public String getGenericFieldTypeString()
public Type getGenericType()
public int getHierarchyDepth()
public Object getMemberClassObject(Object rootObject)
rootObject - reference to the root objectpublic int getModifierID()
public String getModifierString()
public Optional<ClassFieldDescription> getParent()
public ClassFieldDescription getParent(ClassFieldDescription field, int hierarchyLevel)
field - class Field description for whichhierarchyLevel - the recursion level of the parent (e.g. '1' yields the immediate parent, '2' the parent of
the parent etc.)public Class<?> getType()
public String getTypeName()
public boolean isAbstract()
public boolean isClass()
public boolean isEnum()
public boolean isFinal()
true if the class field includes the final modifier; false otherwise.public boolean isInterface()
true if the class field is an interfacepublic boolean isNative()
public boolean isPrimitive()
true if the class field is a primitive type (ie. boolean, byte, ..., int, float, double)public boolean isPrivate()
true if the class field includes the private modifier; false otherwise.public boolean isProtected()
public boolean isPublic()
true if the class field includes the public modifier; false otherwise.public boolean isRoot()
public boolean isSerializable()
true if the class field should be serialised according to Serializable (ie.
object's non-static and non-transient fields); false otherwise.public boolean isStatic()
true if the class field includes the static modifier; false otherwise.public boolean isStrict()
true if the class field includes the strictfp modifier; false otherwise.public boolean isSynchronized()
true if the class field includes the synchronized modifier; false otherwise.public boolean isTransient()
true if the class field includes the transient modifier; false otherwise.public boolean isVolatile()
true if the class field includes the volatile modifier; false otherwise.public Iterator<ClassFieldDescription> iterator()
iterator in interface Iterable<ClassFieldDescription>public AtomicInteger readCount()
public void reset()
public void resetReadCount()
public void resetWriteCount()
public AtomicInteger writeCount()
protected static DataType dataTypeFomClassType(Class<?> classType)
classType - the value to be searchedprotected static void exploreClass(Class<? extends Object> classType, ClassFieldDescription parent, int recursionLevel, boolean fullScan)
Copyright © 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH. All rights reserved.