net.sf.jaxme.js.pattern
Class ProxyGenerator.InterfaceDescription

java.lang.Object
  extended bynet.sf.jaxme.js.pattern.ProxyGenerator.InterfaceDescription
Enclosing class:
ProxyGenerator

public static class ProxyGenerator.InterfaceDescription
extends java.lang.Object

This class describes the properties of an interface, which is extended by the generated class.


Constructor Summary
ProxyGenerator.InterfaceDescription()
           
 
Method Summary
 java.lang.Class getInterface()
          Returns the Java interface.
 boolean isMandatory()
          Returns whether this interface is mandatory.
 void setInterface(java.lang.Class pClass)
          Sets the Java interface.
 void setInterfaceName(java.lang.String pName)
          Sets the Java interface.
 void setMandatory(boolean pMandatory)
          Sets whether this interface is mandatory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyGenerator.InterfaceDescription

public ProxyGenerator.InterfaceDescription()
Method Detail

setInterfaceName

public void setInterfaceName(java.lang.String pName)
                      throws java.lang.ClassNotFoundException

Sets the Java interface. Similar to setInterface(Class.forName(pName)).

Throws:
java.lang.ClassNotFoundException

setInterface

public void setInterface(java.lang.Class pClass)

Sets the Java interface.


getInterface

public java.lang.Class getInterface()

Returns the Java interface.


setMandatory

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.


isMandatory

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.