Interface Annotatable
- All Known Implementing Classes:
ClassInfo,ClassInfoTyped,ClassMeta,ConstructorInfo,FieldInfo,MethodInfo,PackageInfo,ParameterInfo
public interface Annotatable
Interface for all annotatable wrapper classes.
This interface provides a common type for all wrappers around Java reflection objects, allowing polymorphic handling of different annotatable types (Class, Method, Field, Constructor, Parameter, Package).
Implementers include:
ClassInfo- WrapsClassMethodInfo- WrapsMethodFieldInfo- WrapsFieldConstructorInfo- WrapsConstructorParameterInfo- WrapsParameterPackageInfo- WrapsPackage
-
Method Summary
Modifier and TypeMethodDescriptionReturns the type of this annotatable object.getLabel()Returns a human-readable label for this annotatable element.
-
Method Details
-
getAnnotatableType
Returns the type of this annotatable object.- Returns:
- The type of annotatable object this represents.
-
getLabel
Returns a human-readable label for this annotatable element.The label format depends on the type of annotatable:
CLASS_TYPE- Simple class name (e.g.,"MyClass" )METHOD_TYPE- Class and method with parameter types (e.g.,"MyClass.myMethod(String,int)" )FIELD_TYPE- Class and field name (e.g.,"MyClass.myField" )CONSTRUCTOR_TYPE- Class and constructor with parameter types (e.g.,"MyClass.MyClass(String)" )PARAMETER_TYPE- Class, method/constructor, and parameter index (e.g.,"MyClass.myMethod[0]" )PACKAGE_TYPE- Package name (e.g.,"com.example.package" )
- Returns:
- The human-readable label for this annotatable element.
-