- All Known Implementing Classes:
CompiletimeModel,PropertyCompiletime,PropertyCompiletimeModel
public interface CompiletimeModel
This
CompiletimeModel is used by an XL compiler to
parameterize property-related aspects of XL language features.
This mechanism allows XL to be used for a variety of
data sources. Implementations have to provide a suitable mapping of the specific properties
of the data source in order to define an easy-to-use model.
A CompiletimeModel defines the specificity of the properties of a
data source at compile-time. This has to be accompanied by an implementation
of a RuntimeModel that is used at run-time.
The correct run-time model instance is obtained by invocations of
RuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader) with the name
returned by getRuntimeName() as parameter.
A comprehensive specification of the behaviour of CompiletimeModel
is given by the specification of the XL programming language.
- Author:
- Ole Kniemeyer
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA compile-timePropertyis declared by the currentCompiletimeModeland represents a property as defined by the specification of the XL programming language. -
Method Summary
Modifier and TypeMethodDescriptiongetDirectProperty(Type<?> type, String fieldName) Returns a direct property.Defines the name of the correspondingRuntimeModel.
-
Method Details
-
getDirectProperty
Returns a direct property. This method returns the direct property namedfieldNamedeclared intype. If no such property exists,nullis returned.- Parameters:
type- the type in which the property is declaredfieldName- the name of the property- Returns:
- the direct property, if any
-
getRuntimeName
String getRuntimeName()Defines the name of the correspondingRuntimeModel. This name is used during run-time in invocations ofRuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader)in order to obtain theRuntimeModelsuitable for the code that is compiled within this compile-time model.- Returns:
- the name of the corresponding run-time model
-