Package org.mule.runtime.ast.api.builder
Interface ComponentMetadataAstBuilder
@NoImplement
public interface ComponentMetadataAstBuilder
Provides a way of creating
ComponentMetadataAst instances.- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the target component metadata.putDocAttribute(String key, String value) Puts s document attribute value in the metadata.putParserAttribute(String key, Object value) Puts a parser attribute value in the metadata.putParserAttribute(AstParserAttribute<T> attribute, T value) Puts a parser attribute value in the metadata.setEndColumn(int endColumn) Sets the end column for the metadata.setEndLine(int endLine) Sets the last line for the metadata.setFileName(String fileName) Sets the file name for the metadata.setFileUri(URI fileUri) Sets the config file URI for the metadata.setImportChain(List<ImportedResource> importChain) Sets the import chain for the metadata.setSourceCode(String sourceCode) Sets the source code for the metadata.setStartColumn(int startColumn) Sets the start column for the metadata.setStartLine(int startLine) Sets the start line for the metadata.
-
Method Details
-
setFileName
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
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
Sets the import chain for the metadata.- Parameters:
importChain- aListcontaining an element for everyimporttag leading to the file containing the owning component.- Returns:
- This instance for chaining purposes.
-
setStartLine
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
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
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
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
Sets the source code for the metadata.- Parameters:
sourceCode- the source code associated with the owner component.- Returns:
- This instance for chaining purposes.
-
putDocAttribute
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
Puts a parser attribute value in the metadata. Prefer to useputParserAttribute(AstParserAttribute, Object)for type safety. In case you need ot use this one, make surevalueis 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
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
ComponentMetadataAst build()Builds the target component metadata.- Returns:
- the target component metadata.
-