|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ObjectCachePlugin
A plugin interface that allows to insert custom code (to help reuse structs and unions)
into the generated java code. The following IDL is to help illustrate the code insertion
points.
module test
{
struct MyStruct
{
long foo;
};
union MyUnion switch(long)
{
case 1: long foo;
case 2: MyStruct bar;
};
interface MyIntface
{
void op(in MyStruct arg1, inout MyUnion arg2);
};
};
| Method Summary | |
|---|---|
void |
printCheckinHelper(PrintWriter ps,
TypeDeclaration decl)
Code insertion point to add methods to a struct's or union's helper class. |
void |
printCheckout(PrintWriter ps,
String className,
String variableName)
Code insertion point right in the beginning of a struct or union helper's read method. From MyUnionHelper.read():
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
// ----> code from printCheckout() goes here, instead of "MyUnion result = new MyUnion();" <----
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
return result;
}
|
void |
printPostMemberRead(PrintWriter ps,
TypeDeclaration decl,
String variableName)
Code insertion point in the read method of a helper class of a struct or union after reading struct/union members. From MyUnionHelper.read():
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
MyUnion result = new MyUnion();
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
// ----> code from printPostMemberRead() goes here <----
return result;
}
|
void |
printPostParamRead(PrintWriter ps,
List paramDecls)
Code insertion point in the skeleton after reading the parameters, but before invoking the servant. |
void |
printPreMemberRead(PrintWriter ps,
TypeDeclaration decl)
Code insertion point in the read method of a helper class of a struct or union before reading struct/union members. From MyUnionHelper.read():
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
MyUnion result = new MyUnion();
// ----> code from printPreMemberRead() goes here <----
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
return result;
}
|
void |
printPreParamRead(PrintWriter ps,
List paramDecls)
Code insertion point in the skeleton before reading the parameters. |
void |
printSkeletonCheckin(PrintWriter ps,
List paramDecls,
String variablePrefix)
Code insertion poin after invoking the servant. From MyInterfacePOA.invoke()
switch ( opsIndex.intValue() )
{
case 0: // op
{
test.MyStruct _arg0=test.MyStructHelper.read(_input);
test.MyUnionHolder _arg1= new test.MyUnionHolder();
_arg1._read (_input);
_out = handler.createReply();
op(_arg0,_arg1);
test.MyUnionHelper.write(_out,_arg1.value);
// ----> code from printSkeletonCheckin() goes here <----
break;
}
}
|
| Method Detail |
|---|
void printCheckout(PrintWriter ps,
String className,
String variableName)
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
// ----> code from printCheckout() goes here, instead of "MyUnion result = new MyUnion();" <----
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
return result;
}
void printSkeletonCheckin(PrintWriter ps,
List paramDecls,
String variablePrefix)
switch ( opsIndex.intValue() )
{
case 0: // op
{
test.MyStruct _arg0=test.MyStructHelper.read(_input);
test.MyUnionHolder _arg1= new test.MyUnionHolder();
_arg1._read (_input);
_out = handler.createReply();
op(_arg0,_arg1);
test.MyUnionHelper.write(_out,_arg1.value);
// ----> code from printSkeletonCheckin() goes here <----
break;
}
}
void printCheckinHelper(PrintWriter ps,
TypeDeclaration decl)
void printPreParamRead(PrintWriter ps,
List paramDecls)
switch ( opsIndex.intValue() )
{
case 0: // op
{
// ----> code from printPreParamRead() goes here <----
test.MyStruct _arg0=test.MyStructHelper.read(_input);
test.MyUnionHolder _arg1= new test.MyUnionHolder();
_arg1._read (_input);
_out = handler.createReply();
op(_arg0,_arg1);
test.MyUnionHelper.write(_out,_arg1.value);
break;
}
}
void printPostParamRead(PrintWriter ps,
List paramDecls)
switch ( opsIndex.intValue() )
{
case 0: // op
{
test.MyStruct _arg0=test.MyStructHelper.read(_input);
test.MyUnionHolder _arg1= new test.MyUnionHolder();
_arg1._read (_input);
// ----> code from printPostParamRead() goes here <----
_out = handler.createReply();
op(_arg0,_arg1);
test.MyUnionHelper.write(_out,_arg1.value);
break;
}
}
void printPreMemberRead(PrintWriter ps,
TypeDeclaration decl)
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
MyUnion result = new MyUnion();
// ----> code from printPreMemberRead() goes here <----
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
return result;
}
void printPostMemberRead(PrintWriter ps,
TypeDeclaration decl,
String variableName)
public static MyUnion read (org.omg.CORBA.portable.InputStream in)
{
MyUnion result = new MyUnion();
int disc=in.read_long();
switch (disc)
{
case 1:
{
int _var;
_var=in.read_long();
result.foo (_var);
break;
}
case 2:
{
test.MyStruct _var;
_var=test.MyStructHelper.read(in);
result.bar (_var);
break;
}
default: result.__default (disc);
}
// ----> code from printPostMemberRead() goes here <----
return result;
}
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||