Class org.as2lib.env.reflect.ConstructorInfo

org.as2lib.core.BasicClass
   +--org.as2lib.env.reflect.MethodInfo
      +--org.as2lib.env.reflect.ConstructorInfo

Description

ConstructorInfo represents the constrcutor of a class.

The name of a constructor is always "new". This name can be obtained through the constant NAME.

Constructors are also not static.

Field Index

NAME

Method Index

new ConstructorInfo()

getMethod(), snapshot()

Inherited from MethodInfo

getDeclaringType(), getFullName(), getName(), getStringifier(), invoke(), isStatic(), setStringifier(), toString()

Constructor Detail

ConstructorInfo

public function ConstructorInfo(declaringClass:ClassInfo, constructor:Function)

Constructs a new ConstructorInfo instance.

If constructor is not specified, what means undefined, it will be resolved at run-time everytime requested.

Parameters

declaringClassthe class that declares the constructor
constructor(optional) the concrete constructor

Field Detail

NAME

static public NAME:String
The name of constructors.

Method Detail

getMethod

public function getMethod(Void):Function

Returns the concrete constructor this instance represents.

If the concrete constructor was not specified on construction it will be resolved at run-time by this method everytime asked for. The returned constructor is thus always the current constructor of the declaring type. Resolving the class's constructor at run-time does only work if the declaring type returns a not- null package and a not- null name. If these two are null or undefined the function returned by the getType method of the declaring type is returned.

Return

the concrete constructor

Overrides

getMethod() in org.as2lib.env.reflect.MethodInfo

snapshot

public function snapshot(Void):MethodInfo

Returns a ConstructorInfo instance that reflects the current state of this constructor info.

Return

a snapshot of this constructor info

Overrides

snapshot() in org.as2lib.env.reflect.MethodInfo