Package org.osgi.service.feature
Interface FeatureExtensionBuilder
@ProviderType
public interface FeatureExtensionBuilder
A builder for Feature Model
FeatureExtension objects.- "NotThreadSafe"
-
Method Summary
Modifier and TypeMethodDescriptionaddArtifact(FeatureArtifact artifact) Add an Artifact to the extension.Add a line of text to the extension.build()Build the Extension.Add JSON in String form to the extension.
-
Method Details
-
addText
Add a line of text to the extension. Can only be called for extensions of typeFeatureExtension.Type.TEXT.- Parameters:
text- The text to be added.- Returns:
- This builder.
-
setJSON
Add JSON in String form to the extension. Can only be called for extensions of typeFeatureExtension.Type.JSON.- Parameters:
json- The JSON to be added.- Returns:
- This builder.
-
addArtifact
Add an Artifact to the extension. Can only be called for extensions of typeFeatureExtension.Type.ARTIFACTS.- Parameters:
artifact- The artifact to add.- Returns:
- This builder.
-
build
FeatureExtension build()Build the Extension. Can only be called once on a builder. After calling this method the current builder instance cannot be used any more.- Returns:
- The Extension.
-