Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ix.util.reflect
Class ClassDescr

    java.lang.Object
      ix.util.reflect.ClassDescr

    public class ClassDescr

extends java.lang.Object

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`
`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` | `getFieldDescrs()` Returns a List of `FieldDescr`s.
`ClassDescr` | `getKeyType()`
`(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` | `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()`
`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

### syntax

    protected ClassSyntax syntax

### theClass

    public final java.lang.Class theClass

### eltType

    protected ClassDescr eltType

### keyType

    protected ClassDescr keyType

### valType

    protected ClassDescr valType

### type

    protected int type

### fields

    protected FieldMap fields

### externalName

    protected java.lang.String externalName

### upperName

    protected java.lang.String upperName

### INTERFACE

    protected static final int INTERFACE

  Internal class type

  See Also:
    Constant Field Values

### PRIMITIVE

    protected static final int PRIMITIVE

  Internal class type

  See Also:
    Constant Field Values

### LIST

    protected static final int LIST

  Internal class type

  See Also:
    Constant Field Values

### SET

    protected static final int SET

  Internal class type

  See Also:
    Constant Field Values

### MAP

    protected static final int MAP

  Internal class type

  See Also:
    Constant Field Values

### STRUCT

    protected static final int STRUCT

  Internal class type

  See Also:
    Constant Field Values

### XML

    protected static final int XML

  Internal class type

  See Also:
    Constant Field Values

### typeName

    protected static final java.lang.String[] typeName

  Internal type names

Constructor Detail

### ClassDescr

    ClassDescr(ClassSyntax s,
               java.lang.Class c)

### ClassDescr

    ClassDescr(ClassSyntax s,
               java.lang.Class collectionClass,
               java.lang.Class eltClass)

### ClassDescr

    ClassDescr(ClassSyntax s,
               java.lang.Class mapClass,
               java.lang.Class keyClass,
               java.lang.Class valClass)

Method Detail

### init

    protected void init(java.lang.Class c)

### getDescribedClass

    public java.lang.Class getDescribedClass()

  Returns the described class.

### getEltType

    public ClassDescr getEltType()

### getKeyType

    public ClassDescr getKeyType()

### getValType

    public ClassDescr getValType()

### getSuperclass

    java.lang.Class getSuperclass()

  Returns the superclass of the described class. As the JDK javadoc explains,

  > 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.

### determineType

    protected int determineType(java.lang.Class c)

### isInterface

    public boolean isInterface()

### isPrimitive

    public boolean isPrimitive()

### isPrimitive

    protected boolean isPrimitive(java.lang.Class c)

### isAbstract

    public boolean isAbstract()

### isEnumeration

    public boolean isEnumeration()

### isCollection

    public boolean isCollection()

### isList

    public boolean isList()

### isTypedList

    public boolean isTypedList()

### isSet

    public boolean isSet()

### isMap

    public boolean isMap()

### isStruct

    public boolean isStruct()

### isXML

    public boolean isXML()

### visitClass

    public void visitClass(ClassVisitor visitor)

### visitObject

    public void visitObject(java.lang.Object obj,
                            ObjectVisitor visitor)

### mapObject

    public java.lang.Object mapObject(java.lang.Object obj,
                                      ObjectMapper mapper)

### getExternalName

    public java.lang.String getExternalName()

### getUpperName

    public java.lang.String getUpperName()

  Returns an all-upper-case version of the external name.

### getFieldDescrs

    public java.util.List getFieldDescrs()

  Returns a List of `FieldDescr`s.

### ensureFields

    protected void ensureFields()

### fieldForName

    public FieldDescr fieldForName(java.lang.String javaName)

### fieldForExternalName

    public FieldDescr fieldForExternalName(java.lang.String externalName)

### visitFields

    public void visitFields(FieldVisitor fv)

### description

    public java.lang.String description()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD