Class ClassTool.Sub<T extends ClassTool.Sub>
- java.lang.Object
-
- org.apache.velocity.tools.generic.ClassTool.Sub<T>
-
- All Implemented Interfaces:
java.lang.Comparable<T>
- Direct Known Subclasses:
ClassTool.CallableSub,ClassTool.FieldSub
- Enclosing class:
- ClassTool
public abstract static class ClassTool.Sub<T extends ClassTool.Sub> extends java.lang.Object implements java.lang.Comparable<T>
-
-
Constructor Summary
Constructors Constructor Description Sub()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description intcompareTo(T that)Compare unique names of inspected and given objectsbooleanequals(java.lang.Object obj)java.util.List<java.lang.annotation.Annotation>getAnnotations()Returns theAnnotations of the element being inspected.protected abstract java.lang.reflect.AnnotatedElementgetElement()abstract java.lang.StringgetJavadocRef()protected abstract intgetModifiers()abstract java.lang.StringgetName()protected abstract java.lang.StringgetSubType()abstract java.lang.StringgetUniqueName()inthashCode()booleanisAbstract()booleanisDeprecated()Inspected object deprecation statusbooleanisFinal()booleanisInterface()booleanisNative()booleanisPrivate()booleanisProtected()booleanisPublic()booleanisStatic()booleanisStrict()booleanisSynchronized()booleanisTransient()booleanisVolatile()java.lang.StringtoString()
-
-
-
Method Detail
-
getElement
protected abstract java.lang.reflect.AnnotatedElement getElement()
-
getModifiers
protected abstract int getModifiers()
-
getSubType
protected abstract java.lang.String getSubType()
-
getName
public abstract java.lang.String getName()
-
getUniqueName
public abstract java.lang.String getUniqueName()
-
getJavadocRef
public abstract java.lang.String getJavadocRef()
-
getAnnotations
public java.util.List<java.lang.annotation.Annotation> getAnnotations()
Returns theAnnotations 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:
compareToin interfacejava.lang.Comparable<T extends ClassTool.Sub>- Parameters:
that- object to compare to- Returns:
- comparison result
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- Returns:
- hash code
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- object to compare to- Returns:
- whether it's the same object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- Returns:
- string representation
-
-