Class FunctionMetadata

java.lang.Object
nz.org.riskscape.engine.function.FunctionMetadata
All Implemented Interfaces:
Identified

public class FunctionMetadata extends Object implements 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 Details

  • Constructor Details

    • FunctionMetadata

      public FunctionMetadata(String id, List<Type> argumentTypes, Type returnType, URI source)

      This constructor is useful for testing

    • FunctionMetadata

      public FunctionMetadata(String id, List<Type> argumentTypes, Type returnType, String description, IdentifiedFunction.Category category, URI 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 List may 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, URI source)
  • Method Details