Package de.gebit.integrity.annotation
Class FixtureParameterAssessment
- java.lang.Object
-
- de.gebit.integrity.annotation.FixtureParameterAssessment
-
public class FixtureParameterAssessment extends Object
Convenience accessment for theFixtureParameterorForkerParameterannotation, which eagerly load the requested values from the annotation.- Author:
- tilois - Initial API and Implementation
-
-
Field Summary
Fields Modifier and Type Field Description static com.google.common.collect.ImmutableSet<Class<? extends Annotation>>ACCEPTED_ANNOTATIONList of acceptable annotation classes.protected static com.google.common.collect.ImmutableSet<String>ACCEPTED_ANNOTATION_NAMESList of annotation names.static com.google.common.base.Predicate<FixtureParameterAssessment>IS_MANDATORYPredicate to match mandatory parameters.static com.google.common.base.Predicate<FixtureParameterAssessment>IS_NOT_NULLABLEPredicate to match non-nullable parameters.static com.google.common.base.Function<FixtureParameterAssessment,String>NAMEFunction which maps a parameter to its name.protected static com.google.common.collect.ImmutableSet<String>PRIMITIVE_TYPE_NAMESList of types known as primitive types.
-
Constructor Summary
Constructors Constructor Description FixtureParameterAssessment(JvmFixtureEvaluation anEvaluation, org.eclipse.xtext.util.Pair<org.eclipse.xtext.common.types.JvmFormalParameter,org.eclipse.xtext.common.types.JvmAnnotationReference> aParameterTuple)Wraps the given parameter/annotation tuple with the help of the evaluation object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()static booleanisAssignable(org.eclipse.xtext.common.types.JvmAnnotationReference anAnnotation)Checks if the given annotation is a valid annotation that can be wrapped.booleanisMandatory()booleanisNullable()
-
-
-
Field Detail
-
ACCEPTED_ANNOTATION
public static final com.google.common.collect.ImmutableSet<Class<? extends Annotation>> ACCEPTED_ANNOTATION
List of acceptable annotation classes.
-
ACCEPTED_ANNOTATION_NAMES
protected static final com.google.common.collect.ImmutableSet<String> ACCEPTED_ANNOTATION_NAMES
List of annotation names.
-
PRIMITIVE_TYPE_NAMES
protected static final com.google.common.collect.ImmutableSet<String> PRIMITIVE_TYPE_NAMES
List of types known as primitive types.
-
IS_MANDATORY
public static final com.google.common.base.Predicate<FixtureParameterAssessment> IS_MANDATORY
Predicate to match mandatory parameters.
-
IS_NOT_NULLABLE
public static final com.google.common.base.Predicate<FixtureParameterAssessment> IS_NOT_NULLABLE
Predicate to match non-nullable parameters.
-
NAME
public static final com.google.common.base.Function<FixtureParameterAssessment,String> NAME
Function which maps a parameter to its name.
-
-
Constructor Detail
-
FixtureParameterAssessment
public FixtureParameterAssessment(JvmFixtureEvaluation anEvaluation, org.eclipse.xtext.util.Pair<org.eclipse.xtext.common.types.JvmFormalParameter,org.eclipse.xtext.common.types.JvmAnnotationReference> aParameterTuple)
Wraps the given parameter/annotation tuple with the help of the evaluation object.- Parameters:
anEvaluation- Evaluation which provides access to the annotationaParameterTuple- Parameter/annotation to wrap
-
-
Method Detail
-
isAssignable
public static boolean isAssignable(org.eclipse.xtext.common.types.JvmAnnotationReference anAnnotation)
Checks if the given annotation is a valid annotation that can be wrapped.- Parameters:
anAnnotation- Annotation to check.- Returns:
trueif it can be wrapped,falseotherwise.
-
getName
public String getName()
-
isMandatory
public boolean isMandatory()
-
isNullable
public boolean isNullable()
-
-