public interface Extensible<T extends Extensible<T>>
The extensions property names are always prefixed by "x-".
Modifier and Type | Method and Description |
---|---|
T |
addExtension(String name,
Object value)
Adds the given object to this Extensible's map of extensions, with the given name as its key.
|
default T |
extensions(Map<String,Object> extensions)
Sets this Extensible's extensions property to the given map of extensions.
|
Map<String,Object> |
getExtensions()
Returns the extensions property from an Extensible instance.
|
void |
removeExtension(String name)
Removes the given object to this Extensible's map of extensions, with the given name as its key.
|
void |
setExtensions(Map<String,Object> extensions)
Sets this Extensible's extensions property to the given map of extensions.
|
Map<String,Object> getExtensions()
default T extensions(Map<String,Object> extensions)
extensions
- map containing keys which start with "x-" and values which provide additional informationT addExtension(String name, Object value)
name
- the key used to access the extension object. Always prefixed by "x-".value
- data not required by the specification. null values will be rejected (implementation will throw an exception) or ignored.void removeExtension(String name)
name
- the key used to access the extension object. Always prefixed by "x-".Copyright © 2017 – 2020 Eclipse Foundation. All rights reserved.
Use is subject to license terms.