/** * Returns the {@link Annotation}s of the element being inspected. * @return annotations list */ public List<Annotation> getAnnotations() { return Arrays.asList(getElement().getAnnotations()); }
/** * @return whether the inspected object is transcient */ public boolean isTransient() { return Modifier.isTransient(getModifiers()); }
/** * @return hash code */ public int hashCode() { return this.getUniqueName().hashCode(); }
/** * @return whether the inspected object is private */ public boolean isPrivate() { return Modifier.isPrivate(getModifiers()); }
/** * @return whether the inspected object is protected */ public boolean isProtected() { return Modifier.isProtected(getModifiers()); }
/** * @return whether the inspected object is an interface */ public boolean isInterface() { return Modifier.isInterface(getModifiers()); }
/** * @return whether the inspected object is static */ public boolean isStatic() { return Modifier.isStatic(getModifiers()); }
/** * Compare unique names of inspected and given objects * @param that object to compare to * @return comparison result */ public int compareTo(T that) { return this.getUniqueName().compareTo(that.getUniqueName()); }
/** * @return whether the inspected object is abstract */ public boolean isAbstract() { return Modifier.isAbstract(getModifiers()); }
/** * @return whether the inspected object is synchronized */ public boolean isSynchronized() { return Modifier.isSynchronized(getModifiers()); }
/** * @return whether the inspected object is strictfp */ public boolean isStrict() { return Modifier.isStrict(getModifiers()); }
/** * @return whether the inspected object is native */ public boolean isNative() { return Modifier.isNative(getModifiers()); }
/** * @return whether the inspected object is final */ public boolean isFinal() { return Modifier.isFinal(getModifiers()); }
/** * @return whether the inspected object is public */ public boolean isPublic() { return Modifier.isPublic(getModifiers()); }
/** * Inspected object deprecation status * @return deprecation status */ public boolean isDeprecated() { return ClassTool.isDeprecated(getElement()); }
/** * @return whether the inspected object is volatile */ public boolean isVolatile() { return Modifier.isVolatile(getModifiers()); }
/** * @param obj object to compare to * @return whether it's the same object */ public boolean equals(Object obj) { if (obj instanceof Sub) { Sub that = (Sub)obj; return this.getUniqueName().equals(that.getUniqueName()); } return false; }
/** * @return string representation */ public String toString() { return getSubType() + ' ' + getJavadocRef(); } }