|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ix.util.reflect.ClassDescr
public class ClassDescr
A view or description of a class.
N.B. The constructors are deliberately not public so that something
wanting a ClassDescr must go through a ClassSyntax
object.
Field Summary | |
---|---|
protected ClassDescr |
eltType
|
protected java.lang.String |
externalName
|
protected FieldMap |
fields
|
protected static int |
INTERFACE
Internal class type |
protected ClassDescr |
keyType
|
protected static int |
LIST
Internal class type |
protected static int |
MAP
Internal class type |
protected static int |
PRIMITIVE
Internal class type |
protected static int |
SET
Internal class type |
protected static int |
STRUCT
Internal class type |
protected ClassSyntax |
syntax
|
java.lang.Class |
theClass
The class that this describes. |
protected int |
type
|
protected static java.lang.String[] |
typeName
Internal type names |
protected java.lang.String |
upperName
|
protected ClassDescr |
valType
|
protected static int |
XML
Internal class type |
Constructor Summary | |
---|---|
ClassDescr(ClassSyntax s,
java.lang.Class c)
|
|
ClassDescr(ClassSyntax s,
java.lang.Class collectionClass,
java.lang.Class eltClass)
|
|
ClassDescr(ClassSyntax s,
java.lang.Class mapClass,
java.lang.Class keyClass,
java.lang.Class valClass)
|
Method Summary | |
---|---|
java.lang.String |
description()
|
protected int |
determineType(java.lang.Class c)
|
protected void |
ensureFields()
|
FieldDescr |
fieldForExternalName(java.lang.String externalName)
|
FieldDescr |
fieldForName(java.lang.String javaName)
|
java.lang.Class |
getDescribedClass()
Returns the described class. |
ClassDescr |
getEltType()
|
java.lang.String |
getExternalName()
|
java.util.List<FieldDescr> |
getFieldDescrs()
Returns a List of FieldDescr s. |
ClassDescr |
getKeyType()
|
java.lang.String |
getName()
|
(package private) java.lang.Class |
getSuperclass()
Returns the superclass of the described class. |
java.lang.String |
getUpperName()
Returns an all-upper-case version of the external name. |
ClassDescr |
getValType()
|
protected void |
init(java.lang.Class c)
|
boolean |
isAbstract()
|
boolean |
isCollection()
|
boolean |
isEnumeration()
|
boolean |
isFinal()
|
boolean |
isInterface()
|
boolean |
isList()
|
boolean |
isMap()
|
boolean |
isPrimitive()
|
protected boolean |
isPrimitive(java.lang.Class c)
|
boolean |
isSet()
|
boolean |
isStruct()
|
boolean |
isTypedList()
|
boolean |
isXML()
|
java.lang.Object |
mapObject(java.lang.Object obj,
ObjectMapper mapper)
|
java.lang.String |
toString()
|
boolean |
valueIsOk(java.lang.Object val)
|
void |
visitClass(ClassVisitor visitor)
|
void |
visitFields(FieldVisitor fv)
|
void |
visitObject(java.lang.Object obj,
ObjectVisitor visitor)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ClassSyntax syntax
public final java.lang.Class theClass
protected ClassDescr eltType
protected ClassDescr keyType
protected ClassDescr valType
protected int type
protected FieldMap fields
protected java.lang.String externalName
protected java.lang.String upperName
protected static final int INTERFACE
protected static final int PRIMITIVE
protected static final int LIST
protected static final int SET
protected static final int MAP
protected static final int STRUCT
protected static final int XML
protected static final java.lang.String[] typeName
Constructor Detail |
---|
ClassDescr(ClassSyntax s, java.lang.Class c)
ClassDescr(ClassSyntax s, java.lang.Class collectionClass, java.lang.Class eltClass)
ClassDescr(ClassSyntax s, java.lang.Class mapClass, java.lang.Class keyClass, java.lang.Class valClass)
Method Detail |
---|
protected void init(java.lang.Class c)
public java.lang.Class getDescribedClass()
public ClassDescr getEltType()
public ClassDescr getKeyType()
public ClassDescr getValType()
java.lang.Class getSuperclass()
If this Class represents either the Object class, an interface, a primitive type, or void, then null is returned. If [it] represents an array class then the Class object representing the Object class is returned.
public boolean valueIsOk(java.lang.Object val)
protected int determineType(java.lang.Class c)
public boolean isInterface()
public boolean isPrimitive()
protected boolean isPrimitive(java.lang.Class c)
public boolean isFinal()
public boolean isAbstract()
public boolean isEnumeration()
public boolean isCollection()
public boolean isList()
public boolean isTypedList()
public boolean isSet()
public boolean isMap()
public boolean isStruct()
public boolean isXML()
public void visitClass(ClassVisitor visitor)
public void visitObject(java.lang.Object obj, ObjectVisitor visitor)
public java.lang.Object mapObject(java.lang.Object obj, ObjectMapper mapper)
public java.lang.String getName()
public java.lang.String getExternalName()
public java.lang.String getUpperName()
public java.util.List<FieldDescr> getFieldDescrs()
FieldDescr
s.
protected void ensureFields()
public FieldDescr fieldForName(java.lang.String javaName)
public FieldDescr fieldForExternalName(java.lang.String externalName)
public void visitFields(FieldVisitor fv)
public java.lang.String description()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |