T - The type of the attribute value. Please try to stick to basic Java types like Integer, Double, BigDecimal, String,
Boolean, etc. to avoid class loading issues when serializing/deserializing these.public class AstParserAttribute<T> extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AstParserAttribute(String key) |
| Modifier and Type | Method and Description |
|---|---|
Optional<T> |
get(ComponentMetadataAst componentMetadataAst)
Convenience for extracting the value from the attributes map of the given
ComponentMetadataAst with type conversion. |
String |
getKey() |
Optional<Object> |
getRaw(ComponentMetadataAst componentMetadataAst)
Gets the raw value from the attributes map of the given
ComponentMetadataAst without trying to perform type
conversion. |
protected AstParserAttribute(String key)
public String getKey()
ComponentMetadataAst.public Optional<T> get(ComponentMetadataAst componentMetadataAst)
ComponentMetadataAst with type conversion.componentMetadataAst - A ComponentMetadataAst to get the attribute value from.public Optional<Object> getRaw(ComponentMetadataAst componentMetadataAst)
ComponentMetadataAst without trying to perform type
conversion.
get(ComponentMetadataAst) should be preferred for type safety.componentMetadataAst - A ComponentMetadataAst to get the attribute value from.Copyright © 2022 MuleSoft, Inc.. All rights reserved.