io.sarl.lang.typesystem
Class SARLAnnotationUtil
@javax.inject.Singleton
class SARLAnnotationUtil
extends java.lang.Object
Utilities for JVM annotations.

This class provides additional utilities than org.eclipse.xtext.xbase.annotations.typing.XAnnotationUtil and AnnotationLookup.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
See:
org.eclipse.xtext.xbase.annotations.typing.XAnnotationUtil for Xbase annotations, org.eclipse.xtext.common.types.util.AnnotationLookup for retreiving annotations.
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
org.eclipse.xtext.common.types.JvmAnnotationReference findAnnotation(JvmAnnotationTarget,String)
Find an annotation.
java.lang.Boolean findBooleanValue(JvmAnnotationReference)
Extract the boolean value of the given annotation, if it exists.
java.lang.Boolean findBooleanValue(JvmAnnotationTarget,Class<T>)
Extract the boolean value of the given annotation, if it exists.
java.util.List<E> findBooleanValues(JvmAnnotationReference)
Extract the boolean values of the given annotation, if they exist.
java.util.List<E> findBooleanValues(JvmAnnotationTarget,Class<T>)
Extract the boolean values of the given annotation, if they exist.
java.lang.Integer findIntValue(JvmAnnotationReference)
Extract the integer value of the given annotation, if it exists.
java.lang.Integer findIntValue(JvmAnnotationTarget,Class<T>)
Extract the integer value of the given annotation, if it exists.
java.util.List<E> findIntValues(JvmAnnotationReference)
Extract the integer values of the given annotation, if they exist.
java.util.List<E> findIntValues(JvmAnnotationTarget,Class<T>)
Extract the integer values of the given annotation, if they exist.
java.lang.String findStringValue(JvmAnnotationReference)
Extract the string value of the given annotation, if it exists.
java.lang.String findStringValue(JvmAnnotationTarget,Class<T>)
Extract the string value of the given annotation, if it exists.
java.util.List<E> findStringValues(JvmAnnotationReference)
Extract the string values of the given annotation, if they exist.
java.util.List<E> findStringValues(JvmAnnotationTarget,Class<T>)
Extract the string values of the given annotation, if they exist.
java.util.List<E> findTypeValues(JvmAnnotationReference)
Extract the type values of the given annotation, if they exist.
java.util.List<E> findTypeValues(JvmAnnotationTarget,Class<T>)
Extract the type values of the given annotation, if they exist.
Constructor Details
new
new
Action Details
findAnnotation(JvmAnnotationTarget,String)
def findAnnotation(JvmAnnotationTarget,String) : org.eclipse.xtext.common.types.JvmAnnotationReference
Find an annotation.
Parameters:
annotationTarget - the annotation target.
lookupType - the name of the type to look for.
Returns:
the annotation or null .
See:
findAnnotation(JvmAnnotationTarget,Class<T>)
findBooleanValue(JvmAnnotationReference)
def findBooleanValue(JvmAnnotationReference) : java.lang.Boolean
Extract the boolean value of the given annotation, if it exists.
Parameters:
reference - the reference to the annotation.
Returns:
the value of the annotation, or null if no annotation or no value.
Since:
0.6
findBooleanValue(JvmAnnotationTarget,Class<T>)
def findBooleanValue(JvmAnnotationTarget,Class<T>) : java.lang.Boolean
Extract the boolean value of the given annotation, if it exists.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the value of the annotation, or null if no annotation or no value.
Since:
0.6
findBooleanValues(JvmAnnotationReference)
def findBooleanValues(JvmAnnotationReference) : java.util.List<E>
Extract the boolean values of the given annotation, if they exist.
Parameters:
reference - the reference to the annotation.
Returns:
the values of the annotation, never null .
Since:
0.6
findBooleanValues(JvmAnnotationTarget,Class<T>)
def findBooleanValues(JvmAnnotationTarget,Class<T>) : java.util.List<E>
Extract the boolean values of the given annotation, if they exist.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the values of the annotation, never null .
Since:
0.6
findIntValue(JvmAnnotationReference)
def findIntValue(JvmAnnotationReference) : java.lang.Integer
Extract the integer value of the given annotation, if it exists.
Parameters:
reference - the reference to the annotation.
Returns:
the value of the annotation, or null if no annotation or no value.
Since:
0.6
findIntValue(JvmAnnotationTarget,Class<T>)
def findIntValue(JvmAnnotationTarget,Class<T>) : java.lang.Integer
Extract the integer value of the given annotation, if it exists.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the value of the annotation, or null if no annotation or no value.
Since:
0.6
findIntValues(JvmAnnotationReference)
def findIntValues(JvmAnnotationReference) : java.util.List<E>
Extract the integer values of the given annotation, if they exist.
Parameters:
reference - the reference to the annotation.
Returns:
the values of the annotation, never null .
Since:
0.6
findIntValues(JvmAnnotationTarget,Class<T>)
def findIntValues(JvmAnnotationTarget,Class<T>) : java.util.List<E>
Extract the integer values of the given annotation, if they exist.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the values of the annotation, never null .
Since:
0.6
findStringValue(JvmAnnotationReference)
def findStringValue(JvmAnnotationReference) : java.lang.String
Extract the string value of the given annotation, if it exists.
Parameters:
reference - the reference to the annotation.
Returns:
the value of the annotation, or null if no annotation or no value.
findStringValue(JvmAnnotationTarget,Class<T>)
def findStringValue(JvmAnnotationTarget,Class<T>) : java.lang.String
Extract the string value of the given annotation, if it exists.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the value of the annotation, or null if no annotation or no value.
findStringValues(JvmAnnotationReference)
def findStringValues(JvmAnnotationReference) : java.util.List<E>
Extract the string values of the given annotation, if they exist.
Parameters:
reference - the reference to the annotation.
Returns:
the values of the annotation, never null .
findStringValues(JvmAnnotationTarget,Class<T>)
def findStringValues(JvmAnnotationTarget,Class<T>) : java.util.List<E>
Extract the string values of the given annotation, if they exist.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the values of the annotation, never null .
findTypeValues(JvmAnnotationReference)
def findTypeValues(JvmAnnotationReference) : java.util.List<E>
Extract the type values of the given annotation, if they exist.
Parameters:
reference - the reference to the annotation.
Returns:
the values of the annotation, never null .
findTypeValues(JvmAnnotationTarget,Class<T>)
def findTypeValues(JvmAnnotationTarget,Class<T>) : java.util.List<E>
Extract the type values of the given annotation, if they exist.
Parameters:
op - the annotated element.
annotationType - the type of the annotation to consider
Returns:
the values of the annotation, never null .