public class Extension extends Object
ExtensionType| Constructor and Description |
|---|
Extension(ExtensionType t,
String name,
boolean required)
Create a new extension
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<Artifact> |
getArtifacts()
Get the artifacts of the extension
|
String |
getJSON()
Get the JSON of the extension
|
String |
getName()
Get the extension name
|
String |
getText()
Get the text of the extension
|
ExtensionType |
getType()
Get the extension type
|
int |
hashCode() |
boolean |
isOptional()
Return whether the extension is required or optional
|
boolean |
isRequired()
Return whether the extension is required or optional
|
void |
setJSON(String text)
Set the JSON of the extension
|
void |
setText(String text)
Set the text of the extension
|
String |
toString() |
public Extension(ExtensionType t, String name, boolean required)
t - The type of the extensionname - The name of the extensionrequired - Whether the extension is required or optionalIllegalArgumentException - If name or t are nullpublic ExtensionType getType()
public String getName()
public boolean isRequired()
true if the extension is required.public boolean isOptional()
true if the extension is optional.public String getText()
IllegalStateException - if the type is not ExtensionType#TEXTpublic void setText(String text)
text - The textIllegalStateException - if the type is not ExtensionType#TEXTpublic String getJSON()
IllegalStateException - if the type is not ExtensionType#JSONpublic void setJSON(String text)
text - The JSONIllegalStateException - if the type is not ExtensionType#JSONpublic List<Artifact> getArtifacts()
IllegalStateException - if the type is not ExtensionType#ARTIFACTSCopyright © 2007–2018 The Apache Software Foundation. All rights reserved.