Class DescriptorSourceFactory
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.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
Fields Modifier and Type Field Description static java.lang.StringCOLLECTOR_DEFAULTDefault implementation of theDescriptorCollectordescriptor source.static java.lang.StringCOLLECTOR_PROPERTYProperty name for overriding the implementation of theDescriptorCollectordescriptor source, which is by default set to the class inCOLLECTOR_DEFAULT.static java.lang.StringPARSER_DEFAULTDefault implementation of theDescriptorParserdescriptor source.static java.lang.StringPARSER_PROPERTYProperty name for overriding the implementation of theDescriptorParserdescriptor source, which is by default set to the class inPARSER_DEFAULT.static java.lang.StringREADER_DEFAULTDefault implementation of theDescriptorReaderdescriptor source.static java.lang.StringREADER_PROPERTYProperty name for overriding the implementation of theDescriptorReaderdescriptor source, which is by default set to the class inREADER_DEFAULT. -
Constructor Summary
Constructors Constructor Description DescriptorSourceFactory() -
Method Summary
Modifier and Type Method Description static DescriptorCollectorcreateDescriptorCollector()Create a newDescriptorCollectorby instantiating the class inCOLLECTOR_PROPERTY.static DescriptorParsercreateDescriptorParser()Create a newDescriptorParserby instantiating the class inPARSER_PROPERTY.static DescriptorReadercreateDescriptorReader()Create a newDescriptorReaderby instantiating the class inREADER_PROPERTY.
-
Field Details
-
PARSER_DEFAULT
public static final java.lang.String PARSER_DEFAULTDefault implementation of theDescriptorParserdescriptor source.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
READER_DEFAULT
public static final java.lang.String READER_DEFAULTDefault implementation of theDescriptorReaderdescriptor source.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
COLLECTOR_DEFAULT
public static final java.lang.String COLLECTOR_DEFAULTDefault implementation of theDescriptorCollectordescriptor source.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
PARSER_PROPERTY
public static final java.lang.String PARSER_PROPERTYProperty name for overriding the implementation of theDescriptorParserdescriptor source, which is by default set to the class inPARSER_DEFAULT.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
READER_PROPERTY
public static final java.lang.String READER_PROPERTYProperty name for overriding the implementation of theDescriptorReaderdescriptor source, which is by default set to the class inREADER_DEFAULT.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
COLLECTOR_PROPERTY
public static final java.lang.String COLLECTOR_PROPERTYProperty name for overriding the implementation of theDescriptorCollectordescriptor source, which is by default set to the class inCOLLECTOR_DEFAULT.- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
-
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
-