@Retention(value=RUNTIME) @Target(value=METHOD) public static @interface Node.NodeIntrinsic
InvocationPlugin that calls either
a factory method or a constructor corresponding with the annotated method. By default the
intrinsics are implemented by invoking the constructor but a factory method may be used
instead. To use a factory method the class implementing the intrinsic must be annotated with
Node.NodeIntrinsicFactory. To ease error checking of NodeIntrinsics all intrinsics are
expected to be implemented in the same way, so it's not possible to mix constructor and
factory intrinsification in the same class.
A factory method corresponding to an annotated method is a static method named
intrinsify defined in the class denoted by Node.NodeIntrinsic.value(). In order, its signature
is as follows:
GraphBuilderContext parameter.Node.NodeIntrinsic.value(). In order, its signature is as follows:
Node.NodeIntrinsic annotated method.| Modifier and Type | Optional Element and Description |
|---|---|
boolean |
hasSideEffect
If
true then this is lowered into a node that has side effects. |
boolean |
injectedStampIsNonNull
|
Class<?> |
value
The class declaring the factory method or
Node subclass declaring the constructor
used to intrinsify a call to the annotated method. |
public abstract Class<?> value
Node subclass declaring the constructor
used to intrinsify a call to the annotated method. The default value is the class in
which the annotated method is declared.public abstract boolean injectedStampIsNonNull
true, the factory method or constructor selected by the annotation must have
an injected Stamp parameter. Calling
AbstractPointerStamp.nonNull() on the injected stamp is guaranteed to return
true.