Interface ITypeDefinitions

All Known Implementing Classes:
TypeDefinitions

public interface ITypeDefinitions
This class is responsible of knowing all root elements of the system.
  • record-type
  • ancestry
  • functions
  • expression-templates
Since:
6.0
Author:
F. van der Meer
  • Method Details

    • getFunctionDefinitions

      IFunction[] getFunctionDefinitions(String functionName)
      This method looks up all function definitions for it's name. Function parameter matching is done by the parser itself.
      Parameters:
      functionName - The name of the function which should not be null or empty.
      Returns:
      An array of functions, an empty array should be returned when there was no match.
    • lookupRecordType

      Type lookupRecordType(String entityTypeName, String fieldName)
      This method looks for the type of record access (field) element.
      Parameters:
      entityTypeName - The record type name.
      fieldName - The field name within the record.
      Returns:
      The type of this field when found, null otherwise.
    • lookupRecordType

      Type lookupRecordType(String entityTypeName)
      This function locates the type object for an entity-type name.
      Parameters:
      entityTypeName - The type name of the entity which should be non-zero length.
      Returns:
      The type of this entity type when found, null otherwise.
    • lookupVariable

      Type lookupVariable(String recordTypeName, String instanceName)
      This function looks up a variable ( named-instance ) from the definitions. In this case the variable is a statically created instance which should be available on runtime at all times.
      Parameters:
      recordTypeName - The type name of the record ( entity-type )
      instanceName - The instance name which is unique for this entity-type.
      Returns:
      The type object for this named instance, null otherwise.
    • getSharedAncestor

      String getSharedAncestor(String expectedType, String receivedType)
      This function locates the shared ancestor type for the 2 passed arguments. It will try to find the 'first' shared ancestor within the ancestry tree. If they do not have a shared ancestor null will be returned.
      Parameters:
      expectedType - The first type argument.
      receivedType - The second type argument.
      Returns:
      A string representing the shared ancestor, null when they have no common ancestor.
    • getExpressionTemplate

      IExpr getExpressionTemplate(String templateName)
      This function returns the expression object corresponding to the template name.
      Parameters:
      templateName - The name of the expression template.
      Returns:
      The parsed expression object corresponding to this template, null when it was not found.