OverviewSingleDeprecated

jsx3.lang

class Method

Object
->jsx3.lang.Object
  ->jsx3.lang.Method

class Method
extends jsx3.lang.Object
JSX Class extends the build in JavaScript class Function. Provides reflection capabilities.

Since:

3.1

Method Summary
Object | undefined
apply(thisArg : Object, argArray : Array)
Calls apply on the native function.
Object | undefined
call(arg : Object...)
Calls call on the native function.
int
Returns the number of parameters that this method takes (as declared in the JavaScript source).
jsx3.lang.Class | jsx3.lang.Package
Returns the class that defined this method.
Function
Returns the native JavaScript function of this method.
String
Returns the name of the method.
String
getParameterName(intIndex : int)
Returns the name of a parameter that this method takes (as declared in the JavaScript source).
Array<String>
Returns the names of parameters that this method takes (as declared in the JavaScript source).
boolean
Returns true if this method is abstract.
boolean
Returns whether the definer of this class (returned by getDeclaringClass()) is in fact a package.
boolean
Returns true if this method is static (is a class method).
static Function
newAbstract(paramNames : String...)
Creates a new abstract method.
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Method Detail

apply

Object | undefined apply(thisArg : Object, argArray : Array)
Calls apply on the native function.

Parameters:

thisArgthis argument to pass to Function.apply()
argArrayargument array to pass to Function.apply()

Returns:

 

call

Object | undefined call(arg : Object...)
Calls call on the native function.

Parameters:

argarguments to pass to Function.call(), supports up to 11 arguments (this+10)

Returns:

 

getArity

int getArity()
Returns the number of parameters that this method takes (as declared in the JavaScript source).

Returns:

 

getDeclaringClass

jsx3.lang.Class | jsx3.lang.Package getDeclaringClass()
Returns the class that defined this method.

Returns:

 

getFunction

Function getFunction()
Returns the native JavaScript function of this method.

Returns:

 

getName

String getName()
Returns the name of the method. The name of the method is determined when the class is defined.

Returns:

 

getParameterName

String getParameterName(intIndex : int)
Returns the name of a parameter that this method takes (as declared in the JavaScript source).

Parameters:

intIndexthe index of the parameter name to return

Returns:

 

getParameterNames

Array<String> getParameterNames()
Returns the names of parameters that this method takes (as declared in the JavaScript source).

Returns:

 

isAbstract

boolean isAbstract()
Returns true if this method is abstract. Abstract methods will throw an Exception if they are invoked.

Returns:

 

isPackageMethod

boolean isPackageMethod()
Returns whether the definer of this class (returned by getDeclaringClass()) is in fact a package.

Returns:

 

isStatic

boolean isStatic()
Returns true if this method is static (is a class method).

Returns:

 

newAbstract

static Function newAbstract(paramNames : String...)
Creates a new abstract method.

Parameters:

paramNamesthe names of the parameters that the abtract method will take

Throws:

{jsx3.lang.IllegalArgumentException}if any element in paramNames is not a valid JavaScript identifier.

Returns: