public class CreatesMustCallForToJavaExpression extends Object
@CreatesMustCallFor
annotations to JavaExpression
s.Modifier and Type | Method and Description |
---|---|
static List<JavaExpression> |
getCreatesMustCallForExpressionsAtInvocation(MethodInvocationNode n,
GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory,
CreatesMustCallForElementSupplier supplier)
Returns the elements of the @CreatesMustCallFor annotations on the invoked method, as
JavaExpressions.
|
static List<JavaExpression> |
getCreatesMustCallForExpressionsAtMethodDeclaration(MethodTree tree,
GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory,
CreatesMustCallForElementSupplier supplier)
Returns the elements of the @CreatesMustCallFor annotations on the method declaration, as
JavaExpressions.
|
public static List<JavaExpression> getCreatesMustCallForExpressionsAtInvocation(MethodInvocationNode n, GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory, CreatesMustCallForElementSupplier supplier)
If any expression is unparseable, this method reports an error and returns the empty set.
n
- a method invocationatypeFactory
- the type factory to report errors and parse the expression stringsupplier
- a type factory that can supply the executable elements for CreatesMustCallFor
and CreatesMustCallFor.List's value elements. Usually, you should just pass atypeFactory
again. The arguments are different so that the given type factory's adherence to both
protocols are checked by the type system.public static List<JavaExpression> getCreatesMustCallForExpressionsAtMethodDeclaration(MethodTree tree, GenericAnnotatedTypeFactory<?,?,?,?> atypeFactory, CreatesMustCallForElementSupplier supplier)
If any expression is unparseable, this method reports an error and returns the empty set.
tree
- a method declarationatypeFactory
- the type factory to report errors and parse the expression stringsupplier
- a type factory that can supply the executable elements for CreatesMustCallFor
and CreatesMustCallFor.List's value elements. Usually, you should just pass atypeFactory
again. The arguments are different so that the given type factory's adherence to both
protocols are checked by the type system.