Package | Description |
---|---|
gololang |
Provides the top-level Golo support classes.
|
gololang.concurrent.workers |
Support for asynchronous, message-based processing of tasks.
|
gololang.error |
Classes to deal with errors in a functional style.
|
gololang.ir |
Java package for golo IR tree elements.
|
org.eclipse.golo.doc |
(this is an internal API)
|
org.eclipse.golo.runtime |
(this is an internal API)
|
org.eclipse.golo.runtime.adapters |
(this is an internal API)
|
Modifier and Type | Method and Description |
---|---|
FunctionReference |
FunctionReference.andThen(FunctionReference fun)
Compose a function with another function.
|
FunctionReference |
FunctionReference.asCollector(java.lang.Class<?> arrayType,
int arrayLength) |
FunctionReference |
FunctionReference.asCollector(int arrayLength) |
FunctionReference |
FunctionReference.asFixedArity() |
FunctionReference |
FunctionReference.asSpreader() |
FunctionReference |
FunctionReference.asSpreader(java.lang.Class<?> arrayType,
int arrayLength) |
FunctionReference |
FunctionReference.asSpreader(int arrayLength) |
FunctionReference |
FunctionReference.asType(java.lang.invoke.MethodType newType) |
FunctionReference |
FunctionReference.asVarargsCollector() |
FunctionReference |
FunctionReference.asVarargsCollector(java.lang.Class<?> arrayType) |
FunctionReference |
FunctionReference.bindAt(int position,
java.lang.Object value)
Partial application.
|
FunctionReference |
FunctionReference.bindAt(java.lang.String parameterName,
java.lang.Object value)
Partial application based on parameter's names.
|
FunctionReference |
FunctionReference.bindTo(java.lang.Object x) |
FunctionReference |
TemplateEngine.compile(java.lang.String template)
Compile a template into a function.
|
FunctionReference |
FunctionReference.compose(FunctionReference fun) |
static FunctionReference |
DynamicObject.delegate(DynamicObject deleguee)
Creates a function suitable for the
fallback property delegating to the given dynamic object. |
static FunctionReference |
Predefined.fun(java.lang.Class<?> caller,
java.lang.Object name,
java.lang.Object module)
Obtains the first reference to a function.
|
static FunctionReference |
Predefined.fun(java.lang.Class<?> caller,
java.lang.Object name,
java.lang.Object module,
java.lang.Object arity)
Obtains the first reference to a function.
|
static FunctionReference |
Predefined.fun(java.lang.Class<?> caller,
java.lang.Object name,
java.lang.Object module,
java.lang.Object arity,
java.lang.Object varargs)
Obtains a reference to a function.
|
FunctionReference |
FunctionReference.insertArguments(int position,
java.lang.Object... values)
Partial application.
|
static FunctionReference |
Predefined.toFunctionReference(java.lang.reflect.Method targetMethod,
int functionArity) |
Modifier and Type | Method and Description |
---|---|
FunctionReference |
FunctionReference.andThen(FunctionReference fun)
Compose a function with another function.
|
FunctionReference |
FunctionReference.compose(FunctionReference fun) |
static LazyList |
LazyList.cons(java.lang.Object head,
FunctionReference tail)
Create a new list from the head and tail values.
|
java.lang.Object |
DynamicVariable.withValue(java.lang.Object value,
FunctionReference func)
Given a value, calls a function
func . |
Modifier and Type | Method and Description |
---|---|
Port |
WorkerEnvironment.spawn(FunctionReference func)
Spawns a worker function.
|
Modifier and Type | Method and Description |
---|---|
Result<?,? extends java.lang.Throwable> |
Result.andThen(FunctionReference mapper)
Same as
map or flatMap depending on the type returned by mapper . |
java.lang.Object |
Result.either(FunctionReference mapping,
FunctionReference recover)
Case analysis for the result.
|
java.lang.Object |
Result.either(FunctionReference mapping,
FunctionReference recover,
FunctionReference def)
Three way case analysis for the result.
|
Result<java.lang.Object,java.lang.Throwable> |
Result.flatMap(FunctionReference mapper)
Golo compatible version of
flatMap . |
Result<java.lang.Object,java.lang.Throwable> |
Result.map(FunctionReference mapper)
Golo compatible version of
map . |
java.lang.Object |
Result.orElseGet(FunctionReference fun)
Return the value of present, otherwise return the result of the invocation of
fun . |
java.lang.Object |
Result.reduce(java.lang.Object init,
FunctionReference func)
Reduce
this using func with init as initial value. |
Modifier and Type | Method and Description |
---|---|
protected abstract FunctionReference |
Visitors.DispatchIrVisitor.dispatchFunction(GoloElement<?> elt) |
Modifier and Type | Method and Description |
---|---|
GoloElement<?> |
GoloElement.ancestor(FunctionReference predicate)
Returns the first ancestor of this node matching the given predicate.
|
java.util.List<GoloElement<?>> |
GoloElement.children(FunctionReference predicate)
Returns a iterable on the direct children of this node matching the given predicate.
|
java.util.List<GoloElement<?>> |
GoloElement.descendants(FunctionReference predicate)
Returns a list of all the descendants of this node matching the given predicate.
|
ToplevelElements |
ToplevelElements.map(FunctionReference fun)
Map a golo function on the contained elements.
|
Block |
Block.map(FunctionReference fun)
Creates a new block by applying the given function to the elements of this block.
|
GoloElement<?> |
GoloElement.next(FunctionReference predicate)
Returns the next sibling of this element matching the given predicate.
|
GoloElement<?> |
GoloElement.previous(FunctionReference predicate)
Returns the previous sibling of this element matching the given predicate.
|
static GoloIrVisitor |
Visitors.visitor(FunctionReference function)
Creates a visitor from a unique function.
|
static Visitors.DispatchIrVisitor |
Visitors.visitor(FunctionReference fun,
gololang.ir.Visitors.Walk walk)
Creates a visitor from a unique function.
|
static Visitors.DispatchIrVisitor |
Visitors.visitor(java.util.Map<java.lang.Class<? extends GoloElement<?>>,FunctionReference> functions,
FunctionReference defaultFunction,
gololang.ir.Visitors.Walk walk)
Creates a visitor from a map of functions.
|
Modifier and Type | Method and Description |
---|---|
static GoloIrVisitor |
Visitors.visitor(java.util.Map<java.lang.Class<? extends GoloElement<?>>,FunctionReference> functions)
Creates a visitor from a map of functions.
|
static Visitors.DispatchIrVisitor |
Visitors.visitor(java.util.Map<java.lang.Class<? extends GoloElement<?>>,FunctionReference> functions,
FunctionReference defaultFunction,
gololang.ir.Visitors.Walk walk)
Creates a visitor from a map of functions.
|
Modifier and Type | Method and Description |
---|---|
protected FunctionReference |
AbstractProcessor.template(java.lang.String name,
java.lang.String format) |
Modifier and Type | Method and Description |
---|---|
static boolean |
ClosureCallSupport.guard(FunctionReference expected,
FunctionReference actual) |
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,FunctionReference> |
AdapterDefinition.getImplementations() |
java.util.Map<java.lang.String,FunctionReference> |
AdapterDefinition.getOverrides() |
Modifier and Type | Method and Description |
---|---|
AdapterDefinition |
AdapterDefinition.implementsMethod(java.lang.String name,
FunctionReference target) |
AdapterDefinition |
AdapterDefinition.overridesMethod(java.lang.String name,
FunctionReference target) |