Class JavaAnnotation
java.lang.Object
com.github.tadukoo.java.annotation.JavaAnnotation
- All Implemented Interfaces:
JavaCodeType,JavaTokens
- Direct Known Subclasses:
EditableJavaAnnotation,UneditableJavaAnnotation
Represents an annotation in Java.
- Since:
- Alpha v.0.3 (as old version that is now more like UneditableJavaAnnotation), Alpha v.0.4 (as newer version)
- Version:
- Beta v.0.6
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected StringThe canonical name of the annotationprotected StringThe name of the annotationThe parameters of the annotation (as Pairs of name and value)Fields inherited from interface com.github.tadukoo.java.JavaCodeType
NEWLINE_WITH_2_TABS, NEWLINE_WITH_4_TABSFields inherited from interface com.github.tadukoo.java.JavaTokens
ABSTRACT_MODIFIER, ANNOTATION_START_TOKEN, ASSIGNMENT_OPERATOR_TOKEN, BLOCK_CLOSE_TOKEN, BLOCK_OPEN_TOKEN, CLASS_TOKEN, EXTENDS_TOKEN, FINAL_MODIFIER, IMPLEMENTS_TOKEN, IMPORT_TOKEN, JAVADOC_AUTHOR_TOKEN, JAVADOC_LINE_TOKEN, JAVADOC_PARAM_TOKEN, JAVADOC_RETURN_TOKEN, JAVADOC_SINCE_TOKEN, JAVADOC_START_TOKEN, JAVADOC_VERSION_TOKEN, LIST_SEPARATOR_TOKEN, MODIFIERS, MULTI_LINE_COMMENT_CLOSE_TOKEN, MULTI_LINE_COMMENT_START_TOKEN, PACKAGE_TOKEN, PARAMETER_CLOSE_TOKEN, PARAMETER_OPEN_TOKEN, PRIVATE_MODIFIER, PROTECTED_MODIFIER, PUBLIC_MODIFIER, SEMICOLON, SINGLE_LINE_COMMENT_TOKEN, STATIC_MODIFIER, THROWS_TOKEN, TYPE_PARAMETER_CLOSE_TOKEN, TYPE_PARAMETER_OPEN_TOKEN, VARARGS_TOKEN, VISIBILITY_MODIFIERS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedJavaAnnotation(boolean editable, String name, String canonicalName, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters) Constructs a newJavaAnnotationwith the given parameters -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.github.tadukoo.java.JavaCodeType
escapeQuotes
-
Field Details
-
name
The name of the annotation -
canonicalName
The canonical name of the annotation -
parameters
The parameters of the annotation (as Pairs of name and value)
-
-
Constructor Details
-
JavaAnnotation
protected JavaAnnotation(boolean editable, String name, String canonicalName, List<com.github.tadukoo.util.tuple.Pair<String, String>> parameters) Constructs a newJavaAnnotationwith the given parameters- Parameters:
editable- Whether the annotation is editable or notname- The name of the annotationcanonicalName- The canonical name of the annotationparameters- The parameters of the annotation (as Pairs of name and value)
-
-
Method Details
-
getJavaCodeType
- Specified by:
getJavaCodeTypein interfaceJavaCodeType- Returns:
- What
typethis is
-
isEditable
public boolean isEditable()- Returns:
- Whether the annotation is editable or not
-
getName
- Returns:
- The name of the annotation
-
getCanonicalName
- Returns:
- The canonical name of the annotation
-
getParameters
- Returns:
- The parameters of the annotation (as Pairs of name and value)
-
getParametersMap
- Returns:
- The parameters of the annotation as a Map of parameter name to value
-
toString
-
equals
-
toBuilderCode
- Specified by:
toBuilderCodein interfaceJavaCodeType- Returns:
- The String of code to build the
JavaCodeType
-