public abstract class ManifestSection<T> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ManifestSection.ActionSection
Module section for an Action.
|
static class |
ManifestSection.ClipboardConvertorSection
Deprecated.
use META-INF/services to register convertors.
|
static class |
ManifestSection.DebuggerSection
Deprecated.
use new debugger API
|
static class |
ManifestSection.LoaderSection
Module section for a Data Loader.
|
Modifier | Constructor and Description |
---|---|
protected |
ManifestSection(String name,
Module module,
Object superclazz)
Create a manifest section generally.
|
Modifier and Type | Method and Description |
---|---|
static ManifestSection |
create(String name,
Attributes attr,
Module module)
Parse a manifest section and make an object representation of it.
|
protected Object |
createInstance()
Create a fresh instance.
|
void |
dispose()
Dispose of a section.
|
protected ClassLoader |
getClassLoader()
Get the classloader used to load this section.
|
Object |
getInstance()
Get a single cached instance.
|
Module |
getModule()
Get the associated module.
|
Class<?> |
getSectionClass()
Get the class which the generated instances will have.
|
String |
getSectionClassName()
Same as
ManifestSection.getSectionClass() , but only provides the name of the class. |
Class<?> |
getSuperclass()
Get the superclass which all instances of this section are expected to
be assignable to.
|
boolean |
isDefaultInstance()
Does this section represent a default instance?
Normally true, but false when deserializing beans.
|
String |
toString()
String representation for debugging.
|
protected ManifestSection(String name, Module module, Object superclazz) throws InvalidException
name
- name of section, should be a class file, e.g. foo/Bar.classmodule
- associated modulesuperclazz
- super-class of instances of this sectionInvalidException
- if the name is not valid for an OpenIDE section
(exception must include module for reference)public final Module getModule()
protected final ClassLoader getClassLoader()
public final boolean isDefaultInstance()
public final Class<?> getSectionClass() throws Exception
Exception
- for various reasonspublic String getSectionClassName() throws Exception
ManifestSection.getSectionClass()
, but only provides the name of the class.
Could be more efficient because it will not try to load the class unless
a serialized bean is in use.Exception
protected final Object createInstance() throws Exception
Exception
- if there is an errorpublic final Object getInstance() throws Exception
Exception
- if there is an errorpublic final Class<?> getSuperclass()
public void dispose()
public String toString()
public static ManifestSection create(String name, Attributes attr, Module module) throws InvalidException
name
- name of the section (i.e. file to load)attr
- attributes of the manifest sectionmodule
- the associated moduleInvalidException
- if the attributes are not valid