Constructs a new reflection object instance.
Parameters:
name |
string |
Object name |
options |
Object.<string, *> |
optional
Declared options |
Members
-
Comment text, if any.
-
Defining file name.
-
Full name including leading dot.
-
Unique name within its namespace.
-
Options.
-
Parent namespace.
-
Parsed Options.
-
Whether already resolved or not.
-
Reference to the root namespace.
Methods
-
Gets an option value.
Parameters:
namestring Option name
Returns:
* Option value or undefinedif not set -
Called when this object is added to a parent.
Parameters:
parentReflectionObject Parent added to
Returns:
undefined -
Called when this object is removed from a parent.
Parameters:
parentReflectionObject Parent removed from
Returns:
undefined -
resolve(){ ReflectionObject }
-
Resolves this objects type references.
Returns:
ReflectionObject this -
setOption(name, value, ifNotSet){ ReflectionObject }
-
Sets an option.
Parameters:
namestring Option name
value* Option value
ifNotSetboolean | undefined optional Sets the option only if it isn't currently set
Returns:
ReflectionObject this -
setOptions(options, ifNotSet){ ReflectionObject }
-
Sets multiple options.
Parameters:
optionsObject.<string, *> Options to set
ifNotSetboolean optional Sets an option only if it isn't currently set
Returns:
ReflectionObject this -
setParsedOption(name, value, propName){ ReflectionObject }
-
Sets a parsed option.
Parameters:
namestring parsed Option name
value* Option value
propNamestring dot '.' delimited full path of property within the option to set. if undefined\empty, will add a new option with that value
Returns:
ReflectionObject this -
Converts this reflection object to its descriptor representation.
Returns:
Object.<string, *> Descriptor -
Converts this instance to its string representation.
Returns:
string Class name[, space, full name]