Interface ComponentMetadataAstBuilder


@NoImplement public interface ComponentMetadataAstBuilder
Provides a way of creating ComponentMetadataAst instances.
Since:
1.1
  • Method Details

    • setFileName

      ComponentMetadataAstBuilder setFileName(String fileName)
      Sets the file name for the metadata.
      Parameters:
      fileName - the config file name in which the owner component was defined.
      Returns:
      This instance for chaining purposes.
    • setFileUri

      ComponentMetadataAstBuilder setFileUri(URI fileUri)
      Sets the config file URI for the metadata.
      Parameters:
      fileUri - the config file URI in which the owner component was defined
      Returns:
      This instance for chaining purposes.
    • setImportChain

      ComponentMetadataAstBuilder setImportChain(List<ImportedResource> importChain)
      Sets the import chain for the metadata.
      Parameters:
      importChain - a List containing an element for every import tag leading to the file containing the owning component.
      Returns:
      This instance for chaining purposes.
    • setStartLine

      ComponentMetadataAstBuilder setStartLine(int startLine)
      Sets the start line for the metadata.
      Parameters:
      startLine - the first line number in which the component was defined in the configuration file.
      Returns:
      This instance for chaining purposes.
    • setStartColumn

      ComponentMetadataAstBuilder setStartColumn(int startColumn)
      Sets the start column for the metadata.
      Parameters:
      startColumn - the start column in which the component was defined in the configuration file.
      Returns:
      This instance for chaining purposes.
    • setEndLine

      ComponentMetadataAstBuilder setEndLine(int endLine)
      Sets the last line for the metadata.
      Parameters:
      endLine - the last line in which the component was defined in the configuration file.
      Returns:
      This instance for chaining purposes.
    • setEndColumn

      ComponentMetadataAstBuilder setEndColumn(int endColumn)
      Sets the end column for the metadata.
      Parameters:
      endColumn - the end column in which the component was defined in the configuration file.
      Returns:
      This instance for chaining purposes.
    • setSourceCode

      ComponentMetadataAstBuilder setSourceCode(String sourceCode)
      Sets the source code for the metadata.
      Parameters:
      sourceCode - the source code associated with the owner component.
      Returns:
      This instance for chaining purposes.
    • putDocAttribute

      ComponentMetadataAstBuilder putDocAttribute(String key, String value)
      Puts s document attribute value in the metadata.
      Parameters:
      key - The key to later reference the given document attribute.
      value - The actual value of the attribute.
      Returns:
      This instance for chaining purposes.
    • putParserAttribute

      ComponentMetadataAstBuilder putParserAttribute(String key, Object value)
      Puts a parser attribute value in the metadata. Prefer to use putParserAttribute(AstParserAttribute, Object) for type safety. In case you need ot use this one, make sure value is a basic Java type like Integer, Double, BigDecimal, String, Boolean, etc. to avoid class loading issues when serializing/deserializing these.
      Parameters:
      key - The key to later reference the given parser attribute.
      value - The actual value of the attribute.
      Returns:
      This instance for chaining purposes.
    • putParserAttribute

      <T> ComponentMetadataAstBuilder putParserAttribute(AstParserAttribute<T> attribute, T value)
      Puts a parser attribute value in the metadata.
      Type Parameters:
      T - The type of the attribute value.
      Parameters:
      attribute - The key to later reference the given parser attribute.
      value - The actual value of the attribute.
      Returns:
      This instance for chaining purposes.
    • build

      Builds the target component metadata.
      Returns:
      the target component metadata.