Property (Common API)

Overview - Common API - Client API - Admin API - Runtime API

Property

Property representing an attribute of a class declaration, either a Field or a Relationship.

Details

  • Module common

Method Summary

Name Returns Description
constructor void Create a Property
getFullyQualifiedName string Returns the fully name of a property (ns + class name + property name)
getFullyQualifiedTypeName string Returns the fully qualified type name of a property
getName string Returns the name of a property
getNamespace string Returns the namespace of the parent of this property
getParent ClassDeclaration Returns the owner of this property
getType string Returns the type of a property
isArray boolean Returns true if the field is declared as an array type
isOptional boolean Returns true if the field is optional
isPrimitive boolean Returns true if this property is a primitive type
isTypeEnum boolean Returns true if the field is declared as an enumerated value

Method Details

new Property()

Create a Property.

Parameters

Name Type Mandatory Description
parent ClassDeclaration Yes the owner of this property
ast Object Yes The AST created by the parser

getParent

ClassDeclaration getParent( )

Returns the owner of this property

Returns

ClassDeclaration - the parent class declaration

Parameters

No parameters

getName

string getName( )

Returns the name of a property

Returns

string - the name of this field

Parameters

No parameters

getType

string getType( )

Returns the type of a property

Returns

string - the type of this field

Parameters

No parameters

isOptional

boolean isOptional( )

Returns true if the field is optional

Returns

boolean - true if the field is optional

Parameters

No parameters

getFullyQualifiedTypeName

string getFullyQualifiedTypeName( )

Returns the fully qualified type name of a property

Returns

string - the fully qualified type of this property

Parameters

No parameters

getFullyQualifiedName

string getFullyQualifiedName( )

Returns the fully name of a property (ns + class name + property name)

Returns

string - the fully qualified name of this property

Parameters

No parameters

getNamespace

string getNamespace( )

Returns the namespace of the parent of this property

Returns

string - the namespace of the parent of this property

Parameters

No parameters

isArray

boolean isArray( )

Returns true if the field is declared as an array type

Returns

boolean - true if the property is an array type

Parameters

No parameters

isTypeEnum

boolean isTypeEnum( )

Returns true if the field is declared as an enumerated value

Returns

boolean - true if the property is an enumerated value

Parameters

No parameters

isPrimitive

boolean isPrimitive( )

Returns true if this property is a primitive type.

Returns

boolean - true if the property is a primitive type.

Parameters

No parameters

Inherited methods