Class NodeFactory

java.lang.Object
introspector.model.NodeFactory

public class NodeFactory extends Object
NodeFactory provides a mechanism to create Node instances.
  • Constructor Details

    • NodeFactory

      public NodeFactory()
  • Method Details

    • isBuiltinType

      public static <T> boolean isBuiltinType(Class<T> type)
      Method to know if the type parameter is a built-in type.
      Type Parameters:
      T - The type of the object
      Parameters:
      type - The type to know whether it is built-in
      Returns:
      Whether the type is built-in
    • isEnumType

      static <T> boolean isEnumType(Class<T> type)
      Method to know if a the type parameter is an enum type.
      Type Parameters:
      T - The type of the object
      Parameters:
      type - The type to know whether it is an enum
      Returns:
      Whether the type is an enum
    • createNode

      public static Node createNode(String name, Object value)
      Factory to create the nodes
      Parameters:
      name - Name of the node
      value - Runtime object that will be represented as a node
      Returns:
      The subclass of Node appropriate to represent the name object
    • createNode

      public static Node createNode(String name, Object value, Class<?> type)
      Factory to create the nodes
      Parameters:
      name - Name of the node
      value - Runtime object that will be represented as a node
      type - The object class that will represent the type of the object (value)
      Returns:
      The subclass of Node appropriate to represent the name object