@accordproject/concerto-core
Version:
Core Implementation for the Concerto Modeling Language
89 lines (88 loc) • 2.59 kB
TypeScript
declare const Decorated: any;
/**
* Property representing an attribute of a class declaration,
* either a Field or a Relationship.
*
* @class
* @memberof module:concerto-core
*/
declare class Property extends Decorated {
/**
* Create a Property.
* @param {ClassDeclaration} parent - the owner of this property
* @param {Object} ast - The AST created by the parser
* @throws {IllegalModelException}
*/
constructor(parent: any, ast: any);
/**
* Returns the ModelFile that defines this class.
*
* @public
* @return {ModelFile} the owning ModelFile
*/
getModelFile(): any;
/**
* Returns the owner of this property
* @return {ClassDeclaration} the parent class declaration
*/
getParent(): any;
/**
* Process the AST and build the model
* @throws {IllegalModelException}
* @private
*/
process(): void;
/**
* Validate the property
* @param {ClassDeclaration} classDecl the class declaration of the property
* @throws {IllegalModelException}
* @protected
*/
validate(classDecl: any): void;
/**
* Returns the name of a property
* @return {string} the name of this field
*/
getName(): any;
/**
* Returns the type of a property
* @return {string} the type of this field
*/
getType(): any;
/**
* Returns true if the field is optional
* @return {boolean} true if the field is optional
*/
isOptional(): any;
/**
* Returns the fully qualified type name of a property
* @return {string} the fully qualified type of this property
*/
getFullyQualifiedTypeName(): any;
/**
* Returns the fully name of a property (ns + class name + property name)
* @return {string} the fully qualified name of this property
*/
getFullyQualifiedName(): string;
/**
* Returns the namespace of the parent of this property
* @return {string} the namespace of the parent of this property
*/
getNamespace(): any;
/**
* Returns true if the field is declared as an array type
* @return {boolean} true if the property is an array type
*/
isArray(): any;
/**
* Returns true if the field is declared as an enumerated value
* @return {boolean} true if the property is an enumerated value
*/
isTypeEnum(): any;
/**
* Returns true if this property is a primitive type.
* @return {boolean} true if the property is a primitive type.
*/
isPrimitive(): any;
}
export = Property;