public final class DescriptorSourceFactory
extends java.lang.Object
Descriptor sources are the only producers of classes implementing
the Descriptor superinterface. There exist descriptor sources
for obtaining remote descriptor data (DescriptorCollector) and
descriptor sources for processing local descriptor data
(DescriptorReader and DescriptorParser).
By default, this factory returns implementations from the library's own impl package. This may be overridden by setting Java properties, though most users will simply use the default implementations.
These properties can be used for setting the implementation:
descriptor.collectordescriptor.parserdescriptor.readerAssuming the classpath contains the special implementation referenced, your application classes as well as a descriptor API jar the following is an example for using a different implementation of the descriptor downloader:
java -Ddescriptor.downloader=my.special.descriptorimpl.Downloader \
my.app.Mainclass
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COLLECTOR_DEFAULT
Default implementation of the
DescriptorCollector descriptor
source. |
static java.lang.String |
COLLECTOR_PROPERTY
Property name for overriding the implementation of the
DescriptorCollector descriptor source, which is by default
set to the class in COLLECTOR_DEFAULT. |
static java.lang.String |
PARSER_DEFAULT
Default implementation of the
DescriptorParser descriptor
source. |
static java.lang.String |
PARSER_PROPERTY
Property name for overriding the implementation of the
DescriptorParser descriptor source, which is by default set
to the class in PARSER_DEFAULT. |
static java.lang.String |
READER_DEFAULT
Default implementation of the
DescriptorReader descriptor
source. |
static java.lang.String |
READER_PROPERTY
Property name for overriding the implementation of the
DescriptorReader descriptor source, which is by default set
to the class in READER_DEFAULT. |
| Constructor and Description |
|---|
DescriptorSourceFactory() |
| Modifier and Type | Method and Description |
|---|---|
static DescriptorCollector |
createDescriptorCollector()
Create a new
DescriptorCollector by instantiating the class
in COLLECTOR_PROPERTY. |
static DescriptorParser |
createDescriptorParser()
Create a new
DescriptorParser by instantiating the class in
PARSER_PROPERTY. |
static DescriptorReader |
createDescriptorReader()
Create a new
DescriptorReader by instantiating the class in
READER_PROPERTY. |
public static final java.lang.String PARSER_DEFAULT
DescriptorParser descriptor
source.public static final java.lang.String READER_DEFAULT
DescriptorReader descriptor
source.public static final java.lang.String COLLECTOR_DEFAULT
DescriptorCollector descriptor
source.public static final java.lang.String PARSER_PROPERTY
DescriptorParser descriptor source, which is by default set
to the class in PARSER_DEFAULT.public static final java.lang.String READER_PROPERTY
DescriptorReader descriptor source, which is by default set
to the class in READER_DEFAULT.public static final java.lang.String COLLECTOR_PROPERTY
DescriptorCollector descriptor source, which is by default
set to the class in COLLECTOR_DEFAULT.public static final DescriptorParser createDescriptorParser()
DescriptorParser by instantiating the class in
PARSER_PROPERTY.public static final DescriptorReader createDescriptorReader()
DescriptorReader by instantiating the class in
READER_PROPERTY.public static final DescriptorCollector createDescriptorCollector()
DescriptorCollector by instantiating the class
in COLLECTOR_PROPERTY.