org.apache.velocity.tools.generic

## 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:
  Comparable<ClassTool.FieldSub>

Enclosing class:
  ClassTool

    public static class ClassTool.FieldSub
    extends ClassTool.Sub<ClassTool.FieldSub>

A simplified wrapping interface for inspecting features of a `Field` in an inspected Class.

### Field Summary

Fields
`protected Field` `field`

### Constructor Summary

Constructors
Constructor and Description
`FieldSub(Field field)` FieldSub constructor

### Method Summary

All Methods Instance Methods Concrete Methods
`protected AnnotatedElement` `getElement()`
`String` `getJavadocRef()` Simply returns the name of the field.
`protected int` `getModifiers()`
`String` `getName()`
`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.
`protected String` `getSubType()`
`Class` `getType()`
`String` `getUniqueName()` 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`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### field

    protected Field field

### Constructor Detail

#### FieldSub

    public FieldSub(Field field)

FieldSub constructor

Parameters:
  `field` - inspected field

### Method Detail

#### getElement

    protected AnnotatedElement getElement()

Specified by:
  `getElement` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  inspected element

#### getName

    public String getName()

Specified by:
  `getName` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  field name

#### getUniqueName

    public String getUniqueName()

Simply returns the name of the field, since field names cannot be overloaded.

Specified by:
  `getUniqueName` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  unique name

#### getJavadocRef

    public String getJavadocRef()

Simply returns the name of the field.

Specified by:
  `getJavadocRef` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  field name

#### getType

    public Class getType()

Returns:
  field class

#### getStaticValue

    public 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:
  `getModifiers` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  inspected field modifiers

#### getSubType

    protected String getSubType()

Specified by:
  `getSubType` in class `ClassTool.Sub<ClassTool.FieldSub>`
Returns:
  inspected field inspector type, aka "field"