- All Known Implementing Classes:
CompiletimeModel.PropertyImpl
,PropertyCompiletime.GraphProperty
- Enclosing interface:
- CompiletimeModel
public static interface CompiletimeModel.Property
A compile-time
Property
is declared by the current
CompiletimeModel
and represents a property as defined
by the specification of the XL programming language. Properties
are similar to fields, but can be used in deferred
assignments and some other constructs of the XL programming
language.
A Property
represents a property at compile-time.
This has to be accompanied by a corresponding instance of
RuntimeModel.Property
that is used at run-time.
The correct run-time property instance is obtained by invocations of
RuntimeModel.propertyForName(String, ClassLoader)
with the name returned by getRuntimeName()
as parameter.
A comprehensive specification of the behaviour of Property
is given by the specification of the XL programming language.
- Author:
- Ole Kniemeyer
-
Method Summary
Modifier and TypeMethodDescriptionReturns the component property.getModel()
Returns this property's compile-time model.Defines the name of the correspondingRuntimeModel.Property
.Type<? extends RuntimeModel.Property>
getSubProperty
(String name) Returns a subproperty.Type<?>
getType()
Returns this property's type.getTypeCastProperty
(Type<?> type) Returns a type-cast property.
-
Method Details
-
getType
Type<?> getType()Returns this property's type.- Returns:
- this property's type
-
getModel
CompiletimeModel getModel()Returns this property's compile-time model. This is the model which has declared this property.- Returns:
- this property's model
-
getSubProperty
Returns a subproperty. If this property has a subproperty namedname
, then this subproperty is returned, otherwisenull
.- Parameters:
name
- the name of the subproperty- Returns:
- the subproperty, if any
-
getComponentProperty
CompiletimeModel.Property getComponentProperty()Returns the component property. If this property has an array type, then a component property may exist and is returned by this method, otherwisenull
is returned.- Returns:
- the component property, if any
-
getTypeCastProperty
Returns a type-cast property.type
has to be a reference type which is assignable to the type of this property. The method returns the corresponding type-cast property.- Parameters:
type
- the type of the type-cast property- Returns:
- the type-cast property
-
getRuntimeName
String getRuntimeName()Defines the name of the correspondingRuntimeModel.Property
. This name is used during run-time in invocations ofRuntimeModel.propertyForName(String, ClassLoader)
in order to obtain theRuntimeModel.Property
which corresponds to this compile-time property.- Returns:
- the name of the corresponding run-time property
-
getRuntimeType
Type<? extends RuntimeModel.Property> getRuntimeType()
-