Xvcl And Interface Properties
CjOS Project @ cjos.sourceforge.net
Index
Bind Pages
Cjos Library
Cjos Pages
Cjos News Pages
Eric Pages
Introduction To Smart Api
Osgi Pages
Registry Api Pages
Smart Api Pages
Xvcl Pages
CjOS Project
Summary Page
Mailing List
Download
CVS
JOS Technical Edition
Support This Project
Xvcl Pages; [ Cjos Audience]

Summary

An x-framework for Java should include a template for a Java interface.

To generate the source code,

  1. Define variables for an interface.
  2. Invoke the java-interface.xvcl frame.

Note: For simplicity, the following examples are described in terms of Xvcl And Xml Property.

Example 1

 <model javapackage="org.jos.demo">
   <part name="DebugProperty">
     <property name="Debug" type="boolean"/>
   </part>
 </model>

Result:

 package org.jos.demo;

public interface DebugProperty { /** * Gets Debug property. */ public abstract boolean isDebug();

/** * Sets Debug property. */ public abstract void setDebug( boolean v ); }

Example 2

 <model javapackage="org.jos.demo">
   <part name="Request">
     <property name="Controller" type="Controller" setter="false"/>
     <property name="Spec" setter="false"/>
     <property name="Scheme" setter="false"/>
     <property name="Path" setter="false"/>
     <property name="QueryString" setter="false"/>
     <property name="Fragment" setter="false"/>
   </part>
 </model>

Result:

 package org.jos.demo;

public interface Request { /** * Gets Controller property. */ public abstract Controller getController();

/** * Gets Spec property. */ public abstract String getSpec();

/** * Gets Scheme property. */ public abstract String getScheme();

/** * Sets Path property. */ public abstract String getPath();

/** * Gets QueryString property. */ public abstract String getQueryString();

/** * Gets Fragment property. */ public abstract String getFragment(); }