Ozone Interface Generator
This class is meant to be run statically only. It will generate an
OzoneRemote interface for your OzoneObject (s)
USAGE:
java OzoneInterfaceGenerator your_OzoneObject
CONVENTIONS:
Class Names
OzoneObject classes must be named like *Impl.java. Interfaces
are generated with a _Int inserted into the name.
File Naming:
OzoneObjects must have names like: CarImpl.java The interface generated
will be: CarImpl_Int.java
You do not have to use "Impl". Any name will do. I use a standard because
it is then easy to write makefile rules like:
%.class: %.java
javac $(JFLAGS) -classpath $(CPATH) $<
%Impl_Proxy.class: %Impl.java
/projects/ozone/bin/opp $*Impl
%Impl_Int.java: %Impl.java
java -Djava.compiler=tya -classpath $(CPATH) OzoneInterfaceGenerator $*Impl
javasrc = $(wildcard *.java)
classes = $(javasrc:.java=.class)
htmlobjs = $(javasrc:.java=.html)
IntSrc = $(wildcard *Impl.java)
IntObjs = $(IntSrc:Impl.java=Impl_Int.java)
proxies = $(IntSrc:Impl.java=Impl_Proxy.class)
proxysrc = $(IntSrc:Impl.java=Impl.class)
Coding Style
Public methods must have ALL parameters on one line. Infact
everything up to and including the open curly brace must be on the first
line.
Patterns for identifying methods which should be locked are stored in
a file called int_config. This file should be in the same directory as
the .java files. You need to list one pattern per line. Like:
set
update
reset
delete
modify
OzoneInterfaceGenerator looks for and reads these in. If the first line
of your public method contains any of these strings it appends //update
to the end signaling OPP to make that method a locked() method.
If you do not provide a int_config file OIG uses my favorites, listed
above.
Public Method Examples:
public void setName(String _name) { this.name = _name; }
in the generated interface it produces:
public void setName(String _name);//update
In the following example I use a comment to identify the update method.
One of the patterns just has to be on the first line.
public void killMe() { // update
Produces:
public void killMe();//update
NOTE:
OIG will handle this:
public static final String x = new String("test");
BUT not this: (working on this :) It will get mistaken for a method.
public String x = new String("test");
|