public interface ExtensibleObject extends Cloneable
AbstractExtensibleObject
rather than this interface directly.
You should also create a test that extends from AbstractExtensibleObjectTest.Modifier and Type | Method and Description |
---|---|
Object |
clone()
Expose
Cloneable#clone() as public |
String |
describe()
Output a full description of this object.
|
<T> T |
get(String attribute,
Class<T> type)
Return the current value of the given attribute name, converted to the passed type.
|
<T> T |
get(String attribute,
T defaultValue)
Works like
get(String, Class) but if the attribute is null or not defined, returns the passed defaultValue. |
SortedSet<String> |
getAttributes()
Return the names of all the set attributes.
|
ObjectMetaData |
getObjectMetaData()
Returns the
ObjectMetaData describing this instance. |
List |
getValuePath(String attributePath,
Class lastType)
Traverses dot-separated attributes in the attributePath and returns a list containing all the intermediate values.
|
boolean |
has(String attribute)
Returns true if the given attribute is set and not null.
|
ExtensibleObject |
set(String attribute,
Object value)
Sets the value of the given attribute.
|
SortedSet<String> getAttributes()
ObjectMetaData getObjectMetaData()
ObjectMetaData
describing this instance.boolean has(String attribute)
List getValuePath(String attributePath, Class lastType)
lastType
- the type to convert the last value in the list to.<T> T get(String attribute, Class<T> type)
ObjectUtil.convert(Object, Class)
.
Should traverse dot-separated attributes.<T> T get(String attribute, T defaultValue)
get(String, Class)
but if the attribute is null or not defined, returns the passed defaultValue.
Uses the type of defaultValue to determine the type to convert the current value to.
If null is passed to the default value, no conversion of attribute is made if it is set.
If traversing a dot-separated attribute path, return the default value if any along the path are null.ExtensibleObject set(String attribute, Object value)
String describe()
Object clone()
Cloneable#clone()
as publicCopyright © 2023 Liquibase.org. All rights reserved.