Class ClassTool.FieldSub
- java.lang.Object
-
- org.apache.velocity.tools.generic.ClassTool.Sub<ClassTool.FieldSub>
-
- org.apache.velocity.tools.generic.ClassTool.FieldSub
-
- All Implemented Interfaces:
java.lang.Comparable<ClassTool.FieldSub>
- Enclosing class:
- ClassTool
public static class ClassTool.FieldSub extends ClassTool.Sub<ClassTool.FieldSub>
A simplified wrapping interface for inspecting features of aFieldin an inspected Class.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.reflect.Fieldfield
-
Constructor Summary
Constructors Constructor Description FieldSub(java.lang.reflect.Field field)FieldSub constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.reflect.AnnotatedElementgetElement()java.lang.StringgetJavadocRef()Simply returns the name of the field.protected intgetModifiers()java.lang.StringgetName()java.lang.ObjectgetStaticValue()Returns the value of the field if and only if it is a static field that has no access restrictions set by the security manager.protected java.lang.StringgetSubType()java.lang.ClassgetType()java.lang.StringgetUniqueName()Simply returns the name of the field, since field names cannot be overloaded.-
Methods inherited from class org.apache.velocity.tools.generic.ClassTool.Sub
compareTo, equals, getAnnotations, hashCode, isAbstract, isDeprecated, isFinal, isInterface, isNative, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isTransient, isVolatile, toString
-
-
-
-
Method Detail
-
getElement
protected java.lang.reflect.AnnotatedElement getElement()
- Specified by:
getElementin classClassTool.Sub<ClassTool.FieldSub>- Returns:
- inspected element
-
getName
public java.lang.String getName()
- Specified by:
getNamein classClassTool.Sub<ClassTool.FieldSub>- Returns:
- field name
-
getUniqueName
public java.lang.String getUniqueName()
Simply returns the name of the field, since field names cannot be overloaded.- Specified by:
getUniqueNamein classClassTool.Sub<ClassTool.FieldSub>- Returns:
- unique name
-
getJavadocRef
public java.lang.String getJavadocRef()
Simply returns the name of the field.- Specified by:
getJavadocRefin classClassTool.Sub<ClassTool.FieldSub>- Returns:
- field name
-
getType
public java.lang.Class getType()
- Returns:
- field class
-
getStaticValue
public java.lang.Object getStaticValue()
Returns the value of the field if and only if it is a static field that has no access restrictions set by the security manager.- Returns:
- value of static field
-
getModifiers
protected int getModifiers()
- Specified by:
getModifiersin classClassTool.Sub<ClassTool.FieldSub>- Returns:
- inspected field modifiers
-
getSubType
protected java.lang.String getSubType()
- Specified by:
getSubTypein classClassTool.Sub<ClassTool.FieldSub>- Returns:
- inspected field inspector type, aka "field"
-
-