Class Parameter

    • Method Detail

      • fromNode

        public static Parameter fromNode​(StringNode name,
                                         ObjectNode objectNode)
                                  throws RuleError
        Creates a Parameter instance from the given Node information.
        Parameters:
        name - the name of the parameter being deserialized.
        objectNode - the node to deserialize.
        Returns:
        the created Parameter.
        Throws:
        RuleError
      • getName

        public Identifier getName()
        Gets the parameter name.
        Returns:
        returns the parameter name as an Identifier.
      • getTemplate

        public java.lang.String getTemplate()
        Gets the parameter in template form.
        Returns:
        returns the template form of the parameter.
      • template

        public java.lang.String template()
        Description copied from class: SyntaxElement
        Converts this expression to a string template. By default, this implementation returns a RuntimeException.
        Overrides:
        template in class SyntaxElement
        Returns:
        the String template.
      • isRequired

        public boolean isRequired()
        Gets if the parameter is required or not.
        Returns:
        true if the parameter is required, false otherwise.
      • getType

        public ParameterType getType()
        Gets the documentation value.
        Returns:
        returns the optional documentation value.
      • toType

        public Type toType()
        Gets a Type for the parameter's type.
        Returns:
        a Type for the parameter.
      • getBuiltIn

        public java.util.Optional<java.lang.String> getBuiltIn()
        Gets the built-in parameter name.
        Returns:
        returns the optional built-in parameter name.
      • isBuiltIn

        public boolean isBuiltIn()
        Gets if the parameter uses a built-in parameter.
        Returns:
        returns true if the parameter uses a built-in, false otherwise.
      • getDeprecated

        public java.util.Optional<Deprecated> getDeprecated()
        Gets the deprecated status.
        Returns:
        returns the optional deprecated state.
      • getValue

        public java.util.Optional<Value> getValue()
        Gets the parameter's value.
        Returns:
        returns the optional value.
      • getDocumentation

        public java.util.Optional<java.lang.String> getDocumentation()
        Gets the documentation value.
        Returns:
        returns the optional documentation value.
      • getDefault

        public java.util.Optional<Value> getDefault()
        Gets the parameter's default value.
        Returns:
        returns the optional default value.
      • toNode

        public Node toNode()
        Description copied from interface: ToNode
        Converts a value to a Node.
        Specified by:
        toNode in interface ToNode
        Returns:
        Returns the creates Node.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object