Package | flex.lang.reflect |
Class | public class Field |
Inheritance | Field ![]() |
Property | Defined By | ||
---|---|---|---|
definedBy : Class [read-only]
Returns the Class that defines this field. | Field | ||
elementType : Class [read-only]
Retrieves the element type of the Field
| Field | ||
isProperty : Boolean [read-only]
Returns whether the Field is a property. | Field | ||
isStatic : Boolean [read-only]
Returns whether the Field is static. | Field | ||
metadata : Array [read-only]
Retrieves an array of MetaDataAnnotation instances associated with the Field
| Field | ||
name : String [read-only]
Retrieves the name of the Field
| Field | ||
type : Class [read-only]
Retrieves the Class associated with the Field
| Field |
Method | Defined By | ||
---|---|---|---|
Field(fieldXML:XML, isStatic:Boolean, definedBy:Class, isProperty:Boolean)
Field Constructor
| Field | ||
Compares two Field instances for equality
| Field | ||
getMetaData(name:String):MetaDataAnnotation
Returns the MetaDataAnnotation associated with a given annotation using the annotation's name
| Field | ||
getObj(obj:Object = null):Object
Retrieves the actual field represented by this Field object within the instance or class
where it exists. | Field | ||
hasMetaData(name:String):Boolean
Checks for the existance of a metadata annotation using the annotation's name
| Field |
definedBy | property |
definedBy:Class
[read-only] Returns the Class that defines this field.
public function get definedBy():Class
elementType | property |
elementType:Class
[read-only]
Retrieves the element type of the Field
public function get elementType():Class
isProperty | property |
isProperty:Boolean
[read-only]
Returns whether the Field
is a property. Fields are either
properties (getter/setters) or variables.
public function get isProperty():Boolean
isStatic | property |
isStatic:Boolean
[read-only]
Returns whether the Field
is static.
public function get isStatic():Boolean
metadata | property |
metadata:Array
[read-only]
Retrieves an array of MetaDataAnnotation instances associated with the Field
public function get metadata():Array
name | property |
name:String
[read-only]
Retrieves the name of the Field
public function get name():String
type | property |
type:Class
[read-only]
Retrieves the Class
associated with the Field
public function get type():Class
Field | () | Constructor |
public function Field(fieldXML:XML, isStatic:Boolean, definedBy:Class, isProperty:Boolean)
Field
Constructor
fieldXML:XML — XML that describes the Field to be created
| |
isStatic:Boolean — true if Field is static, else false
| |
definedBy:Class — Class that defines the Field to be created
| |
isProperty:Boolean — true if the Field is a property, else false
|
equals | () | method |
public function equals(item:Field):Boolean
Compares two Field instances for equality
Parameters
item:Field |
Boolean — Returns boolean indicating equality
|
getMetaData | () | method |
public function getMetaData(name:String):MetaDataAnnotation
Returns the MetaDataAnnotation associated with a given annotation using the annotation's name
Parameters
name:String — the name of the annotation
|
MetaDataAnnotation — the MetaDataAnnotation instance for the annotation name, or null if it was not found.
|
getObj | () | method |
public function getObj(obj:Object = null):Object
Retrieves the actual field represented by this Field object within the instance or class where it exists. If an object is passed, then this field is returned from that object instance. If a null argument is passed and the field is static, then the field is treated as static and returned from the class. If a null argument is passed and the field is NOT static, then an error is thrown.
Parameters
obj:Object (default = null ) — An instance where the field exists
|
Object — The object represented by this Field within the specified object or class.
|
hasMetaData | () | method |
public function hasMetaData(name:String):Boolean
Checks for the existance of a metadata annotation using the annotation's name
Parameters
name:String — the name of the annotation
|
Boolean — Returns true if the annotation exists, false if it does not.
|
See also