Package nz.org.riskscape.engine.function
Class FunctionMetadata
java.lang.Object
nz.org.riskscape.engine.function.FunctionMetadata
- All Implemented Interfaces:
Identified
Holds the common details about a RiskScape function, such as its argument-types and return-type. This allows users to supply this information separately to the python/classifier code that they are actually trying to compile/run.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionThis constructor is useful for testingFunctionMetadata
(String id, List<Type> argumentTypes, Type returnType, String description, IdentifiedFunction.Category category, String source) Note that in general you would want to use the constructorFunctionMetadata(String, ArgumentList, Type, String, IdentifiedFunction.Category, String)
instead, but in some cases providing a Listmay be simpler than an ArgumentList, i.e. FunctionMetadata
(String id, ArgumentList arguments, Type returnType, String description, IdentifiedFunction.Category category, String source) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.Identified
getIdentifiedClass
-
Field Details
-
NO_DESCRIPTION
- See Also:
-
UNCATEGORIZED
-
-
Constructor Details
-
FunctionMetadata
This constructor is useful for testing
-
FunctionMetadata
public FunctionMetadata(String id, List<Type> argumentTypes, Type returnType, String description, IdentifiedFunction.Category category, String source) Note that in general you would want to use the constructor
FunctionMetadata(String, ArgumentList, Type, String, IdentifiedFunction.Category, String)
instead, but in some cases providing a Listmay be simpler than an ArgumentList, i.e. when the arguments don't have any keywords. -
FunctionMetadata
public FunctionMetadata(String id, ArgumentList arguments, Type returnType, String description, IdentifiedFunction.Category category, String source)
-
-
Method Details
-
getId
- Specified by:
getId
in interfaceIdentified
- Returns:
- id
-
getArguments
-
getReturnType
-
getDescription
-
getCategory
-
getSource
-