The
InterfaceDescription
is used by the
ProxyGenerator as information storage about
the interfaces being implemented.
The main purporse of an intermediate class is to
encapsulate the way, how information about these
classes is gathered:
- If the interface being implemented is a compiled
class, then Java reflection is used.
- Otherwise, if the interface being implemented is
present as a Java source file, then the
JavaParser
is used.
Method Summary |
String | getInterface() Returns the name of the interface being implemented. |
JavaSource | getJavaSource() |
String | getType() Returns, how to gather information about the interface.
|
boolean | isMandatory() Returns whether this interface is mandatory. |
void | setInterface(String pName) Sets the name of the interface being implemented. |
void | setMandatory(boolean pMandatory) Sets whether this interface is mandatory. |
void | setType(String pType) Sets, how to gather information about the interface.
|
public String getInterface()
Returns the name of the interface being implemented.
public String getType()
Returns, how to gather information about the interface.
Supported values are "Reflection" (Java reflection),
or "Source" (
JavaParser).
The default is null, in which case "Reflection" and "Source"
are tried, in that order.
public boolean isMandatory()
Returns whether this interface is mandatory. By default interfaces
are mandatory and the backing objects must implement this interface.
If an interface isn't mandatory, then a Proxy instance can be created
even for objects which don't implement the interface. However, in that
case it may happen that a ClassCastException is thrown while invoking
a method declared by the interface.
public void setInterface(String pName)
Sets the name of the interface being implemented.
public void setMandatory(boolean pMandatory)
Sets whether this interface is mandatory. By default interfaces
are mandatory and the backing objects must implement this interface.
If an interface isn't mandatory, then a Proxy instance can be created
even for objects which don't implement the interface. However, in that
case it may happen that a ClassCastException is thrown while invoking
a method declared by the interface.
public void setType(String pType)
Sets, how to gather information about the interface.
Supported values are "Reflection" (Java reflection),
or "Source" (
JavaParser).
The default is null, in which case "Reflection" and "Source"
are tried, in that order.