Package introspector.model
Class NodeFactory
java.lang.Object
introspector.model.NodeFactory
NodeFactory provides a mechanism to create Node instances.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NodecreateNode(String name, Object value) Factory to create the nodesstatic NodecreateNode(String name, Object value, Class<?> type) Factory to create the nodesstatic <T> booleanisBuiltinType(Class<T> type) Method to know if thetypeparameter is a built-in type.(package private) static <T> booleanisEnumType(Class<T> type) Method to know if a thetypeparameter is an enum type.
-
Constructor Details
-
NodeFactory
public NodeFactory()
-
-
Method Details
-
isBuiltinType
Method to know if thetypeparameter 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
Method to know if a thetypeparameter 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
Factory to create the nodes- Parameters:
name- Name of the nodevalue- Runtime object that will be represented as a node- Returns:
- The subclass of Node appropriate to represent the name object
-
createNode
Factory to create the nodes- Parameters:
name- Name of the nodevalue- Runtime object that will be represented as a nodetype- The object class that will represent the type of the object (value)- Returns:
- The subclass of Node appropriate to represent the name object
-