com.ibm.streams.operator.model
Annotation Type PrimitiveOperator
-
@Target(value=TYPE) @Retention(value=RUNTIME) @Documented public @interface PrimitiveOperator
Declares a Java primitive operator. A class annotated withPrimitiveOperator
annotation will cause a new SPL Java primitive operator to be declared with the properties as described in the annotation. The class must bepublic
and implement theOperator
interface.A class annotated with the
PrimitiveOperator
annotation causes the operator model XML file to be generated for the operator during toolkit indexing. The model file is generated based on the attributes of this annotation as well other annotations in this package present on or within the class. The resulting operator that can be called from SPL:- Has a SPL namespace defined according to
namespace()
. - Has a SPL name defined according to
name()
.
Here is an example of how the annotation can be used to declare an operator called "SampleOperator" within the "com.ent.samp" SPL namespace:
@PrimitiveOperator(name="SampleOperator", namespace="com.ent.samp") public class TestClass extends AbstractOperator { ... }
- Since:
- InfoSphere® Streams Version 3.2
- Has a SPL namespace defined according to
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element and Description java.lang.String
comment
A string to be added as a comment element to the operator model XML file that will be generated at toolkit indexing time.java.lang.String
description
A description for the operator.java.lang.String
name
Name of the operator.java.lang.String
namespace
SPL namespace of the Java primitive operator.java.lang.String[]
vmArgs
A set of arguments to be passed to the Java VM within which this operator will be run.
-
-
-
Element Detail
-
namespace
public abstract java.lang.String namespace
SPL namespace of the Java primitive operator. The SPL namespace of the operator is:- The value of this
namespace
element of the annotation if it is explicitly present. - Otherwise, the value of the
Namespace
annotation for the package of the annotated class, if it exists. - Otherwise, the package name of the annotated class.
- Returns:
- Namespace for the operator class
- See Also:
Namespace
- Default:
- ""
- The value of this
-
name
public abstract java.lang.String name
Name of the operator. If thisname
element is the default value (the empty string) then the name of the operator is the name of the annotated class. The name of the class must be a valid SPL identifier.- Returns:
- Name of the operator
- Default:
- ""
-
description
public abstract java.lang.String description
A description for the operator. This is used by Streams Studio during content assist etc.- Returns:
- Description of the operator
- Default:
- ""
-
vmArgs
public abstract java.lang.String[] vmArgs
A set of arguments to be passed to the Java VM within which this operator will be run.- Returns:
- VM arguments for the operator
- Default:
- {}
-
comment
public abstract java.lang.String comment
A string to be added as a comment element to the operator model XML file that will be generated at toolkit indexing time. The default value for thiscomment
element is a blank string which means that no comment will be generated into the XML file.- Returns:
- Comment string for the operator model XML file
- Default:
- ""
-
-