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.collectordescriptor.parserdescriptor.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
FieldsModifier and TypeFieldDescriptionstatic final StringDefault implementation of theDescriptorCollectordescriptor source.static final StringProperty name for overriding the implementation of theDescriptorCollectordescriptor source, which is by default set to the class inCOLLECTOR_DEFAULT.static final StringDefault implementation of theDescriptorParserdescriptor source.static final StringProperty name for overriding the implementation of theDescriptorParserdescriptor source, which is by default set to the class inPARSER_DEFAULT.static final StringDefault implementation of theDescriptorReaderdescriptor source.static final StringProperty name for overriding the implementation of theDescriptorReaderdescriptor source, which is by default set to the class inREADER_DEFAULT. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DescriptorCollectorCreate a newDescriptorCollectorby instantiating the class inCOLLECTOR_PROPERTY.static DescriptorParserCreate a newDescriptorParserby instantiating the class inPARSER_PROPERTY.static DescriptorReaderCreate a newDescriptorReaderby instantiating the class inREADER_PROPERTY.
-
Field Details
-
PARSER_DEFAULT
Default implementation of theDescriptorParserdescriptor source.- Since:
- 1.0.0
- See Also:
-
READER_DEFAULT
Default implementation of theDescriptorReaderdescriptor source.- Since:
- 1.0.0
- See Also:
-
COLLECTOR_DEFAULT
Default implementation of theDescriptorCollectordescriptor source.- Since:
- 1.0.0
- See Also:
-
PARSER_PROPERTY
Property name for overriding the implementation of theDescriptorParserdescriptor 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 theDescriptorReaderdescriptor 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 theDescriptorCollectordescriptor 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 newDescriptorParserby instantiating the class inPARSER_PROPERTY.- Since:
- 1.0.0
-
createDescriptorReader
Create a newDescriptorReaderby instantiating the class inREADER_PROPERTY.- Since:
- 1.0.0
-
createDescriptorCollector
Create a newDescriptorCollectorby instantiating the class inCOLLECTOR_PROPERTY.- Since:
- 1.0.0
-