org.apache.velocity.tools.generic

## Class ClassTool.Sub<T extends ClassTool.Sub>

- java.lang.Object
- - org.apache.velocity.tools.generic.ClassTool.Sub<T>

All Implemented Interfaces:
  Comparable<T>

Direct Known Subclasses:
  ClassTool.CallableSub, ClassTool.FieldSub

Enclosing class:
  ClassTool

    public abstract static class ClassTool.Sub<T extends ClassTool.Sub>
    extends Object
    implements Comparable<T>

### Constructor Summary

Constructors
Constructor and Description
`Sub()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`int` `compareTo(T that)` Compare unique names of inspected and given objects
`boolean` `equals(Object obj)`
`List<Annotation>` `getAnnotations()` Returns the `Annotation`s of the element being inspected.
`protected abstract AnnotatedElement` `getElement()`
`abstract String` `getJavadocRef()`
`protected abstract int` `getModifiers()`
`abstract String` `getName()`
`protected abstract String` `getSubType()`
`abstract String` `getUniqueName()`
`int` `hashCode()`
`boolean` `isAbstract()`
`boolean` `isDeprecated()` Inspected object deprecation status
`boolean` `isFinal()`
`boolean` `isInterface()`
`boolean` `isNative()`
`boolean` `isPrivate()`
`boolean` `isProtected()`
`boolean` `isPublic()`
`boolean` `isStatic()`
`boolean` `isStrict()`
`boolean` `isSynchronized()`
`boolean` `isTransient()`
`boolean` `isVolatile()`
`String` `toString()`

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

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

### Constructor Detail

#### Sub

    public Sub()

### Method Detail

#### getElement

    protected abstract AnnotatedElement getElement()

#### getModifiers

    protected abstract int getModifiers()

#### getSubType

    protected abstract String getSubType()

#### getName

    public abstract String getName()

#### getUniqueName

    public abstract String getUniqueName()

#### getJavadocRef

    public abstract String getJavadocRef()

#### getAnnotations

    public List<Annotation> getAnnotations()

Returns the `Annotation`s of the element being inspected.

Returns:
  annotations list

#### isDeprecated

    public boolean isDeprecated()

Inspected object deprecation status

Returns:
  deprecation status

#### isPublic

    public boolean isPublic()

Returns:
  whether the inspected object is public

#### isProtected

    public boolean isProtected()

Returns:
  whether the inspected object is protected

#### isPrivate

    public boolean isPrivate()

Returns:
  whether the inspected object is private

#### isStatic

    public boolean isStatic()

Returns:
  whether the inspected object is static

#### isFinal

    public boolean isFinal()

Returns:
  whether the inspected object is final

#### isInterface

    public boolean isInterface()

Returns:
  whether the inspected object is an interface

#### isNative

    public boolean isNative()

Returns:
  whether the inspected object is native

#### isStrict

    public boolean isStrict()

Returns:
  whether the inspected object is strictfp

#### isSynchronized

    public boolean isSynchronized()

Returns:
  whether the inspected object is synchronized

#### isTransient

    public boolean isTransient()

Returns:
  whether the inspected object is transcient

#### isVolatile

    public boolean isVolatile()

Returns:
  whether the inspected object is volatile

#### isAbstract

    public boolean isAbstract()

Returns:
  whether the inspected object is abstract

#### compareTo

    public int compareTo(T that)

Compare unique names of inspected and given objects

Specified by:
  `compareTo` in interface `Comparable<T extends ClassTool.Sub>`
Parameters:
  `that` - object to compare to
Returns:
  comparison result

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`
Returns:
  hash code

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`
Parameters:
  `obj` - object to compare to
Returns:
  whether it's the same object

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`
Returns:
  string representation