|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.jaetzold.art.RobotInterfaceFactory
This is the class for creating instances of RobotInterface
.
To use it you will have to construct a new instance of RobotInterfaceFactory
and then use any of the provided getInterface(...)
-Methods for retrieving instances of RobotInterface
.
Note: This class depends on a whitespace-separated list of fully qualified class-names given as the value of the property de.jaetzold.art.RobotInterfaceFactory.platforms
The property's value is taken from the System-properties and if it isn't defined there from the file de.jaetzold.art.properties
RobotInterfaceDefinition
,
RobotInterfaceStringDefinition
,
RobotInterface
Constructor Summary | |
RobotInterfaceFactory()
Contruct a new Factory for RobotInterface s. |
Method Summary | |
RobotInterface |
getInterface()
Returns the first sucessfully detected Interface. |
RobotInterface |
getInterface(RobotInterfaceDefinition port)
Scans only the given Port. |
RobotInterface |
getInterface(RobotInterfaceDefinition[] ports)
Scans only the given Ports. |
RobotInterface |
getInterface(String id)
Searches for an interface conforming to a RobotInterfaceStringDefinition constructed from the given String. |
RobotInterface[] |
getInterfaces()
Automatically scans all known Ports for all known types of Interfaces. |
RobotInterface |
getInterfaces(int index)
JavaBeans indexed property. |
RobotInterface[] |
getInterfaces(RobotInterfaceDefinition port)
Scans for RobotInterface s only for the given Port. |
RobotInterface[] |
getInterfaces(RobotInterfaceDefinition[] ports)
Scans for RobotInterface s only for the given Ports. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RobotInterfaceFactory()
RobotInterface
s.Method Detail |
public RobotInterface getInterfaces(int index)
getInterfaces()
public RobotInterface[] getInterfaces()
de.jaetzold.art.RobotInterfaceFactory.platforms
If no interface could be found an array of length 0 is returned.
getInterfaces(RobotInterfaceDefinition[])
public RobotInterface[] getInterfaces(RobotInterfaceDefinition port)
RobotInterface
s only for the given Port. If no interface could be found an array of length 0 is returned.getInterfaces(RobotInterfaceDefinition[])
public RobotInterface[] getInterfaces(RobotInterfaceDefinition[] ports)
RobotInterface
s only for the given Ports.
RobotInterface
-classes have to implement a method with this exact same signature (and a compatible return-type) in order to provide automatic detection capability through RobotInterfaceFactory
.
This method simply collects the RobotInterface
s returned by these methods. In each call to this method the known classes are retrieved again from the property de.jaetzold.art.RobotInterfaceFactory.platforms
and then they are asked again for RobotInterface
s.
All other getInterface(...)
-methods rely on this method, so subclasses of RobotInterfaceFactory
s only need to override this method to support all the various methods for retrieving a RobotInterface
.
If no interface could be found an array of length 0 is returned.
public RobotInterface getInterface()
null
.getInterfaces(RobotInterfaceDefinition[])
public RobotInterface getInterface(RobotInterfaceDefinition port)
null
.getInterfaces(RobotInterfaceDefinition[])
public RobotInterface getInterface(RobotInterfaceDefinition[] ports)
null
.getInterfaces(RobotInterfaceDefinition[])
public RobotInterface getInterface(String id)
null
.getInterfaces(RobotInterfaceDefinition[])
,
RobotInterfaceStringDefinition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |