Class ObjectCreateBuilder

    • Field Detail

      • classLoader

        private final java.lang.ClassLoader classLoader
      • type

        private java.lang.Class<?> type
      • attributeName

        private java.lang.String attributeName
      • constructorArgumentsType

        private java.lang.Class<?>[] constructorArgumentsType
        The constructor argument types
        Since:
        3.2
      • defaultConstructorArguments

        private java.lang.Object[] defaultConstructorArguments
        Default constructor arguments.
        Since:
        3.2
    • Constructor Detail

      • ObjectCreateBuilder

        ObjectCreateBuilder​(java.lang.String keyPattern,
                            java.lang.String namespaceURI,
                            RulesBinder mainBinder,
                            LinkedRuleBuilder mainBuilder,
                            java.lang.ClassLoader classLoader)
    • Method Detail

      • ofType

        public ObjectCreateBuilder ofType​(java.lang.String className)
        Construct an object with the specified class name.
        Parameters:
        className - Java class name of the object to be created
        Returns:
        this builder instance
      • ofType

        public <T> ObjectCreateBuilder ofType​(java.lang.Class<T> type)
        Construct an object with the specified class.
        Type Parameters:
        T - any java type
        Parameters:
        type - Java class of the object to be created
        Returns:
        this builder instance
      • ofTypeSpecifiedByAttribute

        public ObjectCreateBuilder ofTypeSpecifiedByAttribute​(java.lang.String attributeName)
        Allows specify the attribute containing an override class name if it is present.
        Parameters:
        attributeName - The attribute containing an override class name if it is present
        Returns:
        this builder instance
      • usingConstructor

        public ObjectCreateBuilder usingConstructor​(java.lang.String... paramTypeNames)
        Allows users to specify constructor argument type names.
        Parameters:
        paramTypeNames - the constructor argument type names
        Returns:
        this builder instance
        Since:
        3.2
      • usingConstructor

        public ObjectCreateBuilder usingConstructor​(java.lang.Class<?>... constructorArgumentTypes)
        Allows users to specify constructor argument types.
        Parameters:
        constructorArgumentTypes - the constructor argument types
        Returns:
        this builder instance
        Since:
        3.2
      • usingDefaultConstructorArguments

        public ObjectCreateBuilder usingDefaultConstructorArguments​(java.lang.Object... defaultConstructorArguments)
        Allows users to specify default constructor arguments.
        Parameters:
        defaultConstructorArguments - the default constructor arguments.
        Returns:
        this builder instance
        Since:
        3.2