cuba.wired
Class WiredComponentDesc
java.lang.Object
cuba.wired.AbstractDescriptor
cuba.wired.WiredComponentDesc
public class WiredComponentDesc
- extends AbstractDescriptor
Description of a CUBA component type in a wired environment
The implementation class member is usually not set, leaving the
information in the adapters' hands. However, the member can be
set in a special copy constructor which is of interest to introduce
mock implementations for test purposes.
- Author:
- Jan Lessner
Constructor Summary |
WiredComponentDesc(java.lang.String globalName,
java.lang.Class externalWiredAdapter,
java.lang.Class internalWiredAdapter,
java.lang.Class externalInterface,
java.lang.Class internalInterface,
ComponentRefMap componentRefs,
ResourceRefMap resourceRefs,
EnvironmentRefMap environmentRefs,
boolean cmt,
java.lang.String type)
|
WiredComponentDesc(WiredComponentDesc source,
java.lang.Class implementation)
Copy constructor, allowing to specify an alternative implementation class
for the component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WiredComponentDesc
public WiredComponentDesc(java.lang.String globalName,
java.lang.Class externalWiredAdapter,
java.lang.Class internalWiredAdapter,
java.lang.Class externalInterface,
java.lang.Class internalInterface,
ComponentRefMap componentRefs,
ResourceRefMap resourceRefs,
EnvironmentRefMap environmentRefs,
boolean cmt,
java.lang.String type)
WiredComponentDesc
public WiredComponentDesc(WiredComponentDesc source,
java.lang.Class implementation)
- Copy constructor, allowing to specify an alternative implementation class
for the component. This is especially of interest for test purposes to
substitute a component's actual implementation by a mock version.
- Parameters:
source
- The descriptor to copy the original data fromimplementation
- The implementation class to use. This must be
a derivation of the original implementation class, otherwise the
adapters will cause class cast exceptions later on.
getExternalInterface
public java.lang.Class getExternalInterface()
getInternalInterface
public java.lang.Class getInternalInterface()
getComponentRefs
public ComponentRefMap getComponentRefs()
getResourceRefs
public ResourceRefMap getResourceRefs()
getEnvironmentRefs
public EnvironmentRefMap getEnvironmentRefs()
getCmt
public boolean getCmt()
getType
public java.lang.String getType()
getExternalWiredAdapter
public java.lang.Class getExternalWiredAdapter()
getInternalWiredAdapter
public java.lang.Class getInternalWiredAdapter()
getImplementation
public java.lang.Class getImplementation()
checkImplements
public java.lang.String checkImplements(java.lang.Class interfaze,
boolean internal,
boolean exact)
- Description copied from class:
AbstractDescriptor
- Checks wether the component, described by this descriptor
provides the passed interface
- Specified by:
checkImplements
in class AbstractDescriptor
- Parameters:
interfaze
- The required interfaceinternal
- true when looking for an internal interfaceexact
- true when looking for an exact match, otherwise
also a derived interface would be accepted.
- Returns:
- null if the components matches. Otherwise, the name
of the component's interface, supposed to be used in an error message.