java.lang.Object
dev.metaschema.core.metapath.function.IFunction.Builder
- Enclosing interface:
- IFunction
Used to create a function's signature using a builder pattern.
-
Method Summary
Modifier and TypeMethodDescriptionallowUnboundedArity(boolean allow) Indicate if the last argument can be repeated.Add an argument based on the providedargumentsignature.argument(IArgument.Builder builder) Add an argument based on the providedbuilder.build()Builds the function's signature.Mark the function as context dependent.Mark the function as context independent.Mark the function as deterministic.Mark the function as focus dependent.Mark the function as focus independent.functionHandler(IFunctionExecutor handler) Specify the static function to call when executing the function.Define the name of the function.Define the namespace of the function.Mark the function as non-deterministic.Indicate the sequence returned will contain one item.Indicate the sequence returned will contain one or more items.returnType(IItemType type) Define the return sequence Java type of the function.returnType(IEnhancedQName name) Define the return sequence Java type of the function.returnType(String name) Define the return sequence Java type of the function.Indicate the sequence returned will contain zero or more items.Indicate the sequence returned will contain zero or one items.
-
Method Details
-
name
Define the name of the function.- Parameters:
name- the function's name- Returns:
- this builder
-
namespace
Define the namespace of the function.- Parameters:
name- the function's namespace URI as a string- Returns:
- this builder
-
deterministic
Mark the function as deterministic.- Returns:
- this builder
- See Also:
-
nonDeterministic
Mark the function as non-deterministic.- Returns:
- this builder
- See Also:
-
contextDependent
Mark the function as context dependent.- Returns:
- this builder
- See Also:
-
contextIndependent
Mark the function as context independent.- Returns:
- this builder
- See Also:
-
focusDependent
Mark the function as focus dependent.- Returns:
- this builder
- See Also:
-
focusIndependent
Mark the function as focus independent.- Returns:
- this builder
- See Also:
-
allowUnboundedArity
Indicate if the last argument can be repeated.- Parameters:
allow- iftruethen the the last argument can be repeated an unlimited number of times, orfalseotherwise- Returns:
- this builder
-
returnType
Define the return sequence Java type of the function.- Parameters:
name- the extended qualified name of the function's return data type- Returns:
- this builder
-
returnType
Define the return sequence Java type of the function.- Parameters:
name- the qualified name of the function's return data type- Returns:
- this builder
-
returnType
Define the return sequence Java type of the function.- Parameters:
type- the function's return Java type- Returns:
- this builder
-
returnZeroOrOne
Indicate the sequence returned will contain zero or one items.- Returns:
- this builder
-
returnOne
Indicate the sequence returned will contain one item.- Returns:
- this builder
-
returnZeroOrMore
Indicate the sequence returned will contain zero or more items.- Returns:
- this builder
-
returnOneOrMore
Indicate the sequence returned will contain one or more items.- Returns:
- this builder
-
argument
Add an argument based on the providedbuilder.- Parameters:
builder- the argument builder- Returns:
- this builder
-
argument
Add an argument based on the providedargumentsignature.- Parameters:
argument- the argument- Returns:
- this builder
-
functionHandler
Specify the static function to call when executing the function.- Parameters:
handler- a method implementing theIFunctionExecutorfunctional interface- Returns:
- this builder
-
build
Builds the function's signature.- Returns:
- the function's signature
-