public class VehicleInterfaceFactory
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static VehicleInterface |
build(java.lang.Class<? extends VehicleInterface> interfaceType,
android.content.Context context,
java.lang.String resource)
Retrieve the Class for a given name and construct an instance of it.
|
static VehicleInterface |
build(java.lang.String interfaceName,
android.content.Context context,
java.lang.String resource)
Retrieve the Class for a given name and construct an instance of it.
|
static java.lang.Class<? extends VehicleInterface> |
findClass(java.lang.String interfaceName)
Obtain the Class object for a given VehicleInterface class name.
|
public static java.lang.Class<? extends VehicleInterface> findClass(java.lang.String interfaceName) throws VehicleInterfaceException
interfaceName
- the canonical name of class implementing
VehicleInterface
VehicleInterfaceException
- if the named class could not be found
or loaded.public static VehicleInterface build(java.lang.String interfaceName, android.content.Context context, java.lang.String resource) throws VehicleInterfaceException
VehicleInterfaceException
- If the named interfaced could not be
found or if its constructor threw an exception.build(Class, Context, String)
public static VehicleInterface build(java.lang.Class<? extends VehicleInterface> interfaceType, android.content.Context context, java.lang.String resource) throws VehicleInterfaceException
interfaceType
- the desired class to load and instantiate.context
- The Android application or service context to be passed to
the new instance of the VehicleInterface.resource
- A reference to a resource the new instance should use -
see the specific implementation of VehicleInterface
for its
requirements.VehicleInterfaceException
- If the class' constructor threw an
exception.