Interface FeatureExtension
@ProviderType
public interface FeatureExtension
A Feature Model Extension. Extensions can contain either Text, JSON or
a list of Artifacts.
Extensions are of one of the following kinds:
- Mandatory: this extension must be processed by the runtime
- Optional: this extension does not have to be processed by the runtime
- Transient: this extension contains transient information such as caching data that is for optimization purposes. It may be changed or removed and is not part of the feature's identity.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe kind of extension: optional, mandatory or transient.static enumThe type of extension -
Method Summary
-
Method Details
-
getName
-
getType
-
getKind
-
getJSON
String getJSON()Get the JSON from this extension.- Returns:
- The JSON.
- Throws:
IllegalStateException- If called on an extension which is not of type JSON.
-
getText
Get the Text from this extension.- Returns:
- The lines of text. The returned list is unmodifiable.
- Throws:
IllegalStateException- If called on an extension which is not of type TEXT.
-
getArtifacts
List<FeatureArtifact> getArtifacts()Get the Artifacts from this extension.- Returns:
- The Artifacts. The returned list is unmodifiable.
- Throws:
IllegalStateException- If called on an extension which is not of type ARTIFACTS.
-