public static class DefaultComponentMetadataAst.Builder extends Object implements ComponentMetadataAstBuilder
| Constructor and Description |
|---|
Builder(PropertiesResolver propertiesResolver) |
| Modifier and Type | Method and Description |
|---|---|
ComponentMetadataAst |
build()
Builds the target component metadata.
|
DefaultComponentMetadataAst.Builder |
putDocAttribute(String key,
String value)
Puts s document attribute value in the metadata.
|
<T> DefaultComponentMetadataAst.Builder |
putParserAttribute(AstParserAttribute<T> attribute,
T value)
Puts a parser attribute value in the metadata.
|
DefaultComponentMetadataAst.Builder |
putParserAttribute(String key,
Object value)
Puts a parser attribute value in the metadata.
|
DefaultComponentMetadataAst.Builder |
setEndColumn(int endColumn)
Sets the end column for the metadata.
|
DefaultComponentMetadataAst.Builder |
setEndLine(int endLine)
Sets the last line for the metadata.
|
DefaultComponentMetadataAst.Builder |
setFileName(String fileName)
Sets the file name for the metadata.
|
DefaultComponentMetadataAst.Builder |
setFileUri(URI fileUri)
Sets the config file URI for the metadata.
|
DefaultComponentMetadataAst.Builder |
setImportChain(List<ImportedResource> importChain)
Sets the import chain for the metadata.
|
DefaultComponentMetadataAst.Builder |
setSourceCode(String sourceCode)
Sets the source code for the metadata.
|
DefaultComponentMetadataAst.Builder |
setStartColumn(int startColumn)
Sets the start column for the metadata.
|
DefaultComponentMetadataAst.Builder |
setStartLine(int startLine)
Sets the start line for the metadata.
|
public Builder(PropertiesResolver propertiesResolver)
public DefaultComponentMetadataAst.Builder setFileName(String fileName)
ComponentMetadataAstBuildersetFileName in interface ComponentMetadataAstBuilderfileName - the config file name in which the owner component was defined.public DefaultComponentMetadataAst.Builder setFileUri(URI fileUri)
ComponentMetadataAstBuildersetFileUri in interface ComponentMetadataAstBuilderfileUri - the config file URI in which the owner component was definedpublic DefaultComponentMetadataAst.Builder setImportChain(List<ImportedResource> importChain)
ComponentMetadataAstBuildersetImportChain in interface ComponentMetadataAstBuilderimportChain - a List containing an element for every import tag leading to the file containing the
owning component.public DefaultComponentMetadataAst.Builder setStartLine(int startLine)
ComponentMetadataAstBuildersetStartLine in interface ComponentMetadataAstBuilderstartLine - the first line number in which the component was defined in the configuration file.public DefaultComponentMetadataAst.Builder setStartColumn(int startColumn)
ComponentMetadataAstBuildersetStartColumn in interface ComponentMetadataAstBuilderstartColumn - the start column in which the component was defined in the configuration file.public DefaultComponentMetadataAst.Builder setEndLine(int endLine)
ComponentMetadataAstBuildersetEndLine in interface ComponentMetadataAstBuilderendLine - the last line in which the component was defined in the configuration file.public DefaultComponentMetadataAst.Builder setEndColumn(int endColumn)
ComponentMetadataAstBuildersetEndColumn in interface ComponentMetadataAstBuilderendColumn - the end column in which the component was defined in the configuration file.public DefaultComponentMetadataAst.Builder setSourceCode(String sourceCode)
ComponentMetadataAstBuildersetSourceCode in interface ComponentMetadataAstBuildersourceCode - the source code associated with the owner component.public DefaultComponentMetadataAst.Builder putDocAttribute(String key, String value)
ComponentMetadataAstBuilderputDocAttribute in interface ComponentMetadataAstBuilderkey - The key to later reference the given document attribute.value - The actual value of the attribute.public DefaultComponentMetadataAst.Builder putParserAttribute(String key, Object value)
ComponentMetadataAstBuilderComponentMetadataAstBuilder.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.putParserAttribute in interface ComponentMetadataAstBuilderkey - The key to later reference the given parser attribute.value - The actual value of the attribute.public <T> DefaultComponentMetadataAst.Builder putParserAttribute(AstParserAttribute<T> attribute, T value)
ComponentMetadataAstBuilderputParserAttribute in interface ComponentMetadataAstBuilderT - The type of the attribute value.attribute - The key to later reference the given parser attribute.value - The actual value of the attribute.public ComponentMetadataAst build()
ComponentMetadataAstBuilderbuild in interface ComponentMetadataAstBuilderCopyright © 2022 MuleSoft, Inc.. All rights reserved.