Class DescriptorSourceFactory
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.collector
descriptor.parser
descriptor.reader
Assuming 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
- Since:
- 1.0.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default implementation of theDescriptorCollector
descriptor source.static final String
Property name for overriding the implementation of theDescriptorCollector
descriptor source, which is by default set to the class inCOLLECTOR_DEFAULT
.static final String
Default implementation of theDescriptorParser
descriptor source.static final String
Property name for overriding the implementation of theDescriptorParser
descriptor source, which is by default set to the class inPARSER_DEFAULT
.static final String
Default implementation of theDescriptorReader
descriptor source.static final String
Property name for overriding the implementation of theDescriptorReader
descriptor source, which is by default set to the class inREADER_DEFAULT
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DescriptorCollector
Create a newDescriptorCollector
by instantiating the class inCOLLECTOR_PROPERTY
.static DescriptorParser
Create a newDescriptorParser
by instantiating the class inPARSER_PROPERTY
.static DescriptorReader
Create a newDescriptorReader
by instantiating the class inREADER_PROPERTY
.
-
Field Details
-
PARSER_DEFAULT
Default implementation of theDescriptorParser
descriptor source.- Since:
- 1.0.0
- See Also:
-
READER_DEFAULT
Default implementation of theDescriptorReader
descriptor source.- Since:
- 1.0.0
- See Also:
-
COLLECTOR_DEFAULT
Default implementation of theDescriptorCollector
descriptor source.- Since:
- 1.0.0
- See Also:
-
PARSER_PROPERTY
Property name for overriding the implementation of theDescriptorParser
descriptor source, which is by default set to the class inPARSER_DEFAULT
.- Since:
- 1.0.0
- See Also:
-
READER_PROPERTY
Property name for overriding the implementation of theDescriptorReader
descriptor source, which is by default set to the class inREADER_DEFAULT
.- Since:
- 1.0.0
- See Also:
-
COLLECTOR_PROPERTY
Property name for overriding the implementation of theDescriptorCollector
descriptor source, which is by default set to the class inCOLLECTOR_DEFAULT
.- Since:
- 1.0.0
- See Also:
-
-
Constructor Details
-
DescriptorSourceFactory
public DescriptorSourceFactory()
-
-
Method Details
-
createDescriptorParser
Create a newDescriptorParser
by instantiating the class inPARSER_PROPERTY
.- Since:
- 1.0.0
-
createDescriptorReader
Create a newDescriptorReader
by instantiating the class inREADER_PROPERTY
.- Since:
- 1.0.0
-
createDescriptorCollector
Create a newDescriptorCollector
by instantiating the class inCOLLECTOR_PROPERTY
.- Since:
- 1.0.0
-