Class OmlFactory2

java.lang.Object
io.opencaesar.oml.util.OmlFactory2

public final class OmlFactory2 extends Object
The Factory2 for the model. It allows creating OML objects reflectively using their Java type. This is an alternative to OmlFactory which has individual create methods for each object type
  • Field Details

    • INSTANCE

      public static OmlFactory2 INSTANCE
      The singleton factory instance
  • Method Details

    • create

      public <T extends Element> T create(Class<T> type)
      Creates a new Oml object given a Java type
      Parameters:
      type - The Java type of the Oml object
      Returns:
      A new object that is an instance of the given type