de.grogra.xl.property
Interface CompiletimeModel

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
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.
 
Method Summary
 CompiletimeModel.Property getDirectProperty(Type<?> type, java.lang.String fieldName)
          Returns a direct property.
 java.lang.String getRuntimeName()
          Defines the name of the corresponding RuntimeModel.
 

Method Detail

getDirectProperty

CompiletimeModel.Property getDirectProperty(Type<?> type,
                                            java.lang.String fieldName)
Returns a direct property. This method returns the direct property named fieldName declared in type. If no such property exists, null is returned.

Parameters:
type - the type in which the property is declared
fieldName - the name of the property
Returns:
the direct property, if any

getRuntimeName

java.lang.String getRuntimeName()
Defines the name of the corresponding RuntimeModel. This name is used during run-time in invocations of RuntimeModelFactory.modelForName(java.lang.String, java.lang.ClassLoader) in order to obtain the RuntimeModel suitable for the code that is compiled within this compile-time model.

Returns:
the name of the corresponding run-time model