|
Lombok - v0.10.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlombok.core.AnnotationValues<A>
public class AnnotationValues<A extends Annotation>
Represents a single annotation in a source file and can be used to query the parameters present on it.
| Nested Class Summary | |
|---|---|
static class |
AnnotationValues.AnnotationValue
Represents a single method on the annotation class. |
static class |
AnnotationValues.AnnotationValueDecodeFail
Thrown on the fly if an actual annotation instance procured via the getInstance() method is queried
for a method for which this AnnotationValues instance either doesn't have a guess or can't manage to fit
the guess into the required data type. |
| Constructor Summary | |
|---|---|
AnnotationValues(Class<A> type,
Map<String,AnnotationValues.AnnotationValue> values,
LombokNode<?,?,?> ast)
Creates a new AnnotationValues. |
|
| Method Summary | |
|---|---|
Object |
getActualExpression(String annotationMethodName)
Convenience method to return the first result in a getActualExpressions(String) call. |
List<Object> |
getActualExpressions(String annotationMethodName)
Returns the actual expressions used for the provided annotationMethodName. |
A |
getInstance()
Creates an actual annotation instance. |
String |
getProbableFQType(String annotationMethodName)
Convenience method to return the first result in a getProbableFQType(String) call. |
List<String> |
getProbableFQTypes(String annotationMethodName)
Attempts to translate class literals to their fully qualified names, such as 'Throwable.class' to 'java.lang.Throwable'. |
String |
getRawExpression(String annotationMethodName)
Convenience method to return the first result in a getRawExpressions(String) call. |
List<String> |
getRawExpressions(String annotationMethodName)
Returns the raw expressions used for the provided annotationMethodName. |
boolean |
isExplicit(String annotationMethodName)
|
void |
setError(String annotationMethodName,
String message)
Generates an error message on the stated annotation value (you should only call this method if you know it's there!) |
void |
setError(String annotationMethodName,
String message,
int index)
Generates an error message on the stated annotation value, which must have an array initializer. |
void |
setWarning(String annotationMethodName,
String message)
Generates a warning message on the stated annotation value (you should only call this method if you know it's there!) |
void |
setWarning(String annotationMethodName,
String message,
int index)
Generates a warning message on the stated annotation value, which must have an array initializer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotationValues(Class<A> type,
Map<String,AnnotationValues.AnnotationValue> values,
LombokNode<?,?,?> ast)
type - The annotation type. For example, "Getter.class"values - a Map of method names to AnnotationValue instances, for example 'value -> annotationValue instance'.ast - The Annotation node.| Method Detail |
|---|
public A getInstance()
public List<String> getRawExpressions(String annotationMethodName)
annotationMethodName.
You should use this method for annotation methods that return Class objects. Remember that
class literals end in ".class" which you probably want to strip off.
public List<Object> getActualExpressions(String annotationMethodName)
annotationMethodName.
public boolean isExplicit(String annotationMethodName)
public String getRawExpression(String annotationMethodName)
getRawExpressions(String) call.
You should use this method if the annotation method is not an array type.
public Object getActualExpression(String annotationMethodName)
getActualExpressions(String) call.
You should use this method if the annotation method is not an array type.
public void setError(String annotationMethodName,
String message)
public void setWarning(String annotationMethodName,
String message)
public void setError(String annotationMethodName,
String message,
int index)
public void setWarning(String annotationMethodName,
String message,
int index)
public List<String> getProbableFQTypes(String annotationMethodName)
public String getProbableFQType(String annotationMethodName)
getProbableFQType(String) call.
You should use this method if the annotation method is not an array type.
|
Lombok - v0.10.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||