Schnittstelle Outlet

Alle bekannten Unterschnittstellen:
TemplateOutlet
Alle bekannten Implementierungsklassen:
CamelbackOutlet, ConstantNameOutlet, CopyOutlet, DebuggingOutletWrapper, GroovyOutlet, GroovyScriptOutlet, GroovyTemplateOutlet, JavadocOutlet, JavaFilenameOutlet, ModifySourcenameOutlet, NewlineOutlet, OptionOutlet, OutletImpl, OutletWithoutMergepoints, PackageToPathOutlet, StringInputOutlet, TemplateOutletImpl, VelocityOutlet, XmlOutlet

public interface Outlet
Generates String output from the AST.
  • Methodendetails

    • getName

      QualifiedName getName()
      Returns the name of the outlet. The namespace part of the name defines the default context of the outlet.
      Gibt zurück:
      the name of the outlet, not null.
    • addMergepointMapping

      void addMergepointMapping(MergepointMapping mergepointMapping) throws ConfigurationException
      Adds an mergepoint mapping to the outlet. No mergepoint mappings must exist with the given name.
      Parameter:
      mergepointMapping - the mergepointMapping to add, not null.
      Löst aus:
      NullPointerException - if mergepointMapping is null.
      ConfigurationException - if an mergepointMapping for the given name already exists.
    • setMergepointMapping

      MergepointMapping setMergepointMapping(MergepointMapping mergepointMapping)
      Sets an mergepoint mapping in the outlet. If a mergepoint mapping with the given name already exists, it is replaced.
      Parameter:
      mergepointMapping - the mergepointMapping to add, not null.
      Gibt zurück:
      the replaced mergepoint mapping, not null.
      Löst aus:
      NullPointerException - if mergepointMapping is null.
    • getMergepointMapping

      MergepointMapping getMergepointMapping(String name)
      Returns the mergepoint mapping for the given mergepoint name.
      Parameter:
      name - the name of the mergepoint mapping.
      Gibt zurück:
      the mergepoint mapping for the given name, or null if no mergepoint mapping exists for this name.
    • getMergepointMappings

      Map<String,MergepointMapping> getMergepointMappings()
      Returns the map of all mergepoint mappings, keyed by their name.
      Gibt zurück:
      the map of mergepoint mappings, not null.
    • getInputElementName

      String getInputElementName()
      Returns the name of the input root element. If not null, the outlet checks if the name of the input root element corresponds to the set element name and throws an exception if the names do not match.
      Gibt zurück:
      inputName the name of the root element of the source, or if any input name is accepted.
    • setInputElementName

      void setInputElementName(String inputName)
      Sets the name of the input root element. If set, the outlet checks if the name of the input root element corresponds to the set element name and throws an exception if the names do not match.
      Parameter:
      inputName - the name of the root element of the source, or null to accept any input name.
    • getInputClass

      String getInputClass()
      Returns the fully qualified name of the input root class. If not null, the outlet checks if the class name of the input root corresponds to the set class name and throws an exception if the names do not match.
      Gibt zurück:
      inputName the name of the root element of the source, or if any input name is accepted.
    • setInputClass

      void setInputClass(String inputClass)
      Sets the fully qualified name of the input model root class. If set, the outlet checks if the class name of the input model root corresponds to the set class name and throws an exception if the names do not match.
      Parameter:
      inputClass - the name of the root element of the source, or null to accept any input name.
    • beforeExecute

      void beforeExecute(ControllerState controllerState) throws GeneratorException
      Adjusts the state of the Controller before generation.
      Parameter:
      controllerState - the current controller state, not null.
      Löst aus:
      GeneratorException - if adjusting the controller state fails.
    • afterExecute

      void afterExecute(ControllerState controllerState) throws GeneratorException
      Adjusts the state of the Controller after generation.
      Parameter:
      controllerState - the current controller state, not null.
      Löst aus:
      GeneratorException - if adjusting the controller state fails.
    • execute

      OutletResult execute(ControllerState controllerState) throws GeneratorException
      Generates the output for this template into the Generated object.
      Parameter:
      controllerState - the current controller state, not null.
      Gibt zurück:
      the output of the Outlet.
      Löst aus:
      GeneratorException - if generation fails.