T - the concrete type for this declarationpublic abstract class BaseDeclaration<T extends BaseDeclaration> extends Object implements DescribedObject
By default, getDescription() returns an empty String.
| Constructor and Description |
|---|
BaseDeclaration() |
| Modifier and Type | Method and Description |
|---|---|
T |
addModelProperty(ModelProperty modelProperty)
Adds the given .
|
String |
getDescription()
Returns the component's description
|
DisplayModel |
getDisplayModel() |
Set<ModelProperty> |
getModelProperties()
Returns a
Set with the currently added properties. |
<P extends ModelProperty> |
getModelProperty(Class<P> propertyType)
Returns the model property registered under
key |
void |
setDescription(String description)
Sets the
description for this declaration |
void |
setDisplayModel(DisplayModel displayModel)
Sets the
displayModel for this declaration |
public Set<ModelProperty> getModelProperties()
Set with the currently added properties. Notice
that this Set is mutable and not thread-safe.
This method is to be used when you need to access all the properties.
For individual access use addModelProperty(ModelProperty)}
or getModelProperty(Class) instead
Set with the current model properties. Might be empty but will never by nullpublic <P extends ModelProperty> Optional<P> getModelProperty(Class<P> propertyType)
keypublic T addModelProperty(ModelProperty modelProperty)
Class has already been added, it will
be overwritten.modelProperty - a ModelPropertyIllegalArgumentException - if modelProperty is null{}public String getDescription()
getDescription in interface DescribedObjectStringpublic void setDescription(String description)
description for this declarationdescription - public DisplayModel getDisplayModel()
DisplayModel for this declarationpublic void setDisplayModel(DisplayModel displayModel)
displayModel for this declarationdisplayModel - a DisplayModelCopyright © 2017 MuleSoft, Inc.. All rights reserved.