Interface CodeGenerator

All Known Implementing Classes:
BuilderGenerator, EnumGenerator, InterfaceGenerator, TOGenerator

public interface CodeGenerator
Transforms virtual data to the concrete code in programming language.
  • Method Summary

    Modifier and Type
    Method
    Description
    generate(Type type)
    Generates code for type.
    Returns name of type parameter.
    boolean
    Checks if the concrete instance of type fit to concrete implementation of this interface (e.g.
  • Method Details

    • generate

      String generate(Type type)
      Generates code for type.
      Parameters:
      type - Input type to be processed
      Returns:
      generated JAVA code
    • isAcceptable

      boolean isAcceptable(Type type)
      Checks if the concrete instance of type fit to concrete implementation of this interface (e.g. method return true if in EnumGenerator (which implements this interface) has input parameter of type Enumeration (which is subtype of Type).
      Parameters:
      type - Input type to be processed
      Returns:
      true if type is acceptable for processing.
    • getUnitName

      String getUnitName(Type type)
      Returns name of type parameter.
      Parameters:
      type - Input type to be processed
      Returns:
      name of generated unit