public class Function extends Objs
| Modifier and Type | Class and Description |
|---|---|
static interface |
Function.A0<R> |
static interface |
Function.A1<P1,R> |
static interface |
Function.A2<P1,P2,R> |
static interface |
Function.A3<P1,P2,P3,R> |
static interface |
Function.A4<P1,P2,P3,P4,R> |
static interface |
Function.A5<P1,P2,P3,P4,P5,R> |
Objs.Constructor<T extends Objs>, Objs.Property<T>| Modifier and Type | Field and Description |
|---|---|
Objs.Property<Number> |
length |
Object |
prototype |
| Modifier | Constructor and Description |
|---|---|
protected |
Function(Objs.Constructor<?> constructor,
Object js) |
|
Function(String... args)
Creates a new function.
|
| Modifier and Type | Method and Description |
|---|---|
static Function |
$as(Object obj)
Casts given object to this class.
|
static Object |
$call(Object fn,
Object... params)
Invokes an object that represents a function - e.g.
|
Object |
apply(Object thisArg,
Object... argArray)
Calls the function, substituting the specified object for the this value of the function, and the specified array for the arguments of the function.
|
Object |
bind(Object thisArg,
Object... argArray)
For a given function, creates a bound function that has the same body as the original function.
|
static Function |
newFunction(Function.A5<? extends Object,? extends Object,? extends Object,? extends Object,? extends Object,? extends Object> customFunction) |
static Function |
newFunction(String... args) |
$as, $cast, $delete, $get, $js, $set, create, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor, getOwnPropertyNames, getPrototypeOf, hasOwnProperty, isExtensible, isFrozen, isPrototypeOf, isSealed, keys, newObject, newObject, preventExtensions, propertyIsEnumerable, seal, toLocaleString, toString, valueOfpublic Object prototype
public final Objs.Property<Number> length
protected Function(Objs.Constructor<?> constructor, Object js)
public Function(String... args)
args - A list of arguments the function accepts.public static Function $as(Object obj)
obj - any objectobj objectpublic Object apply(Object thisArg, Object... argArray)
thisArg - The object to be used as the this object.argArray - A set of arguments to be passed to the function.public Object bind(Object thisArg, Object... argArray)
thisArg - An object to which the this keyword can refer inside the new function.argArray - A list of arguments to be passed to the new function.public static Function newFunction(Function.A5<? extends Object,? extends Object,? extends Object,? extends Object,? extends Object,? extends Object> customFunction)
public static Object $call(Object fn, Object... params)
Function.A0,
Function.A1, etc.fn - the object representing a functionparams - parameters to pass to the functionIllegalArgumentException - if the object fn isn't a functionCopyright © 2016. All rights reserved.