Lombok - v0.9.3

lombok.core
Class AnnotationValues.AnnotationValue

java.lang.Object
  extended by lombok.core.AnnotationValues.AnnotationValue
Enclosing class:
AnnotationValues<A extends java.lang.annotation.Annotation>

public static class AnnotationValues.AnnotationValue
extends java.lang.Object

Represents a single method on the annotation class. For example, the value() method on the Getter annotation.


Field Summary
 java.util.List<java.lang.String> raws
          A list of the raw expressions.
 java.util.List<java.lang.Object> valueGuesses
          Guesses for each raw expression.
 
Constructor Summary
AnnotationValues.AnnotationValue(LombokNode<?,?,?> node, java.util.List<java.lang.String> raws, java.util.List<java.lang.Object> valueGuesses, boolean isExplicit)
          Like the other constructor, but used for when the annotation method is initialized with an array value.
AnnotationValues.AnnotationValue(LombokNode<?,?,?> node, java.lang.String raw, java.lang.Object valueGuess, boolean isExplicit)
          'raw' should be the exact expression, for example '5+7', 'AccessLevel.PUBLIC', or 'int.class'.
 
Method Summary
 boolean isExplicit()
           
 void setError(java.lang.String message, int valueIdx)
          Override this if you want more specific behaviour (to get the source position just right).
 void setWarning(java.lang.String message, int valueIdx)
          Override this if you want more specific behaviour (to get the source position just right).
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

raws

public final java.util.List<java.lang.String> raws
A list of the raw expressions. List is size 1 unless an array is provided.


valueGuesses

public final java.util.List<java.lang.Object> valueGuesses
Guesses for each raw expression. If the raw expression is a literal expression, the guess will likely be right. If not, it'll be wrong.

Constructor Detail

AnnotationValues.AnnotationValue

public AnnotationValues.AnnotationValue(LombokNode<?,?,?> node,
                                        java.lang.String raw,
                                        java.lang.Object valueGuess,
                                        boolean isExplicit)
'raw' should be the exact expression, for example '5+7', 'AccessLevel.PUBLIC', or 'int.class'. 'valueGuess' should be a likely guess at the real value intended. For classes, supply the class name (qualified or not) as a string.
For enums, supply the simple name part (everything after the last dot) as a string.


AnnotationValues.AnnotationValue

public AnnotationValues.AnnotationValue(LombokNode<?,?,?> node,
                                        java.util.List<java.lang.String> raws,
                                        java.util.List<java.lang.Object> valueGuesses,
                                        boolean isExplicit)
Like the other constructor, but used for when the annotation method is initialized with an array value.

Method Detail

setError

public void setError(java.lang.String message,
                     int valueIdx)
Override this if you want more specific behaviour (to get the source position just right).

Parameters:
message - English message with the problem.
valueIdx - The index into the values for this annotation key that caused the problem. -1 for a problem that applies to all values, otherwise the 0-based index into an array of values. If there is no array for this value (e.g. value=1 instead of value={1,2}), then always -1 or 0.

setWarning

public void setWarning(java.lang.String message,
                       int valueIdx)
Override this if you want more specific behaviour (to get the source position just right).

Parameters:
message - English message with the problem.
valueIdx - The index into the values for this annotation key that caused the problem. -1 for a problem that applies to all values, otherwise the 0-based index into an array of values. If there is no array for this value (e.g. value=1 instead of value={1,2}), then always -1 or 0.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

isExplicit

public boolean isExplicit()

Lombok - v0.9.3

Copyright © 2009 Reinier Zwitserloot and Roel Spilker, licensed under the MIT licence.