Class DslElementSyntaxBuilder

java.lang.Object
org.mule.runtime.extension.api.dsl.syntax.DslElementSyntaxBuilder

public final class DslElementSyntaxBuilder extends Object
Implementation of the builder design pattern to create instances of DslElementSyntax
Since:
1.0
  • Method Details

    • create

      public static DslElementSyntaxBuilder create()
      Returns:
      a new instance of DslElementSyntaxBuilder
    • withAttributeName

      public DslElementSyntaxBuilder withAttributeName(String attributeName)
      Adds a name that describes how this element will be represented as an attribute.
      Returns:
      this builder instance enriched with the attributeName
    • withElementName

      public DslElementSyntaxBuilder withElementName(String elementName)
      Adds a name to the element being declared
      Returns:
      this builder instance enriched with the elementName
    • withNamespace

      public DslElementSyntaxBuilder withNamespace(String prefix, String namespace)
      Adds a prefix to the element being declared
      Returns:
      this builder instance enriched with the prefix
    • asWrappedElement

      public DslElementSyntaxBuilder asWrappedElement(boolean isWrapped)
      Declares whether or not this DslElementSyntax is a wrapped element.
      Returns:
      this builder instance enriched with the isWrapped
    • supportsAttributeDeclaration

      public DslElementSyntaxBuilder supportsAttributeDeclaration(boolean supportsAttribute)
      Declares whether or not this DslElementSyntax supports to be declared as an attribute in the context for which it was created.
      Returns:
      this builder instance enriched with supportsAttributeDeclaration
    • supportsChildDeclaration

      public DslElementSyntaxBuilder supportsChildDeclaration(boolean supportsChild)
      Declares whether or not this DslElementSyntax supports to be declared as child element in the context for which it was created.
      Returns:
      this builder instance enriched with supportsChildDeclaration
    • supportsTopLevelDeclaration

      public DslElementSyntaxBuilder supportsTopLevelDeclaration(boolean supportsTop)
      Declares whether or not this DslElementSyntax supports to be declared as top level element in the context for which it was created.
      Returns:
      this builder instance enriched with supportsTopLevelDeclaration
    • requiresConfig

      public DslElementSyntaxBuilder requiresConfig(boolean requiresConfig)
      Declares whether or not this DslElementSyntax requires a parameter pointing to a config
      Returns:
      this builder instance enriched with supportsTopLevelDeclaration
    • withGeneric

      public DslElementSyntaxBuilder withGeneric(org.mule.metadata.api.model.MetadataType type, DslElementSyntax child)
      Adds a childElement declaration to this DslElementSyntax that represents a generic type of this element.
      Returns:
      this builder instance enriched with the typed childElement
    • containing

      public DslElementSyntaxBuilder containing(String name, DslElementSyntax child)
      Adds a childElement declaration to this DslElementSyntax that can be referenced by name
      Returns:
      this builder instance enriched with the named childElement
    • build

      public DslElementSyntax build()
      Returns:
      a new instance of DslElementSyntax