Class MethodGen
java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.MethodGen
- Direct Known Subclasses:
AttributeGen, MethodGen24
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Stringprivate static final Stringprotected booleanprotected booleanprotected MethodEntryprotected intprivate static final Stringprotected Stringprotected PrintWriterprotected Hashtableprivate static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddispatchSkeleton(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) voidgenerate(Hashtable symbolTable, MethodEntry m, PrintWriter stream) Method generate() is not used in MethodGen.protected voidinterfaceMethod(Hashtable symbolTable, MethodEntry m, PrintWriter stream) protected booleanDetermine whether method entry m is a valuetype initializer.protected voidlocalstub(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index, InterfaceEntry i) protected StringpassType(int passType) protected voidserverMethodName(String name) This is only used by AttributeGen.protected voidskeleton(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) protected voidstub(String className, boolean isAbstract, Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) protected voidwriteCreateReply(String indent) protected voidprivate StringwriteExtract(String source, SymtabEntry type) private voidwriteExtract(String indent, String target, String source, SymtabEntry type, PrintWriter stream) private StringwriteInputStreamRead(String source, SymtabEntry type) private voidwriteInsert(String indent, String target, String source, SymtabEntry type, PrintWriter stream) protected voidprotected voidwriteMethodCall(String indent) protected voidprivate voidwriteOutputStreamWrite(String indent, String oStream, String name, SymtabEntry type, PrintWriter stream) protected voidwriteParmType(SymtabEntry parm, int passType) private voidprotected voidwriteStubBody(String className) private voidwriteStubBodyForLocalInvocation(String className, String methodName) This method writes the else part of the stub method invocation to enable local invocation in case of collocation.private voidwriteType(String indent, String name, SymtabEntry type, PrintWriter stream)
-
Field Details
-
ONE_INDENT
- See Also:
-
TWO_INDENT
- See Also:
-
THREE_INDENT
- See Also:
-
FOUR_INDENT
- See Also:
-
FIVE_INDENT
- See Also:
-
ATTRIBUTE_METHOD_PREFIX_LENGTH
private static final int ATTRIBUTE_METHOD_PREFIX_LENGTH- See Also:
-
methodIndex
protected int methodIndex -
realName
-
symbolTable
-
m
-
stream
-
localOptimization
protected boolean localOptimization -
isAbstract
protected boolean isAbstract
-
-
Constructor Details
-
MethodGen
public MethodGen()Public zero-argument constructor.
-
-
Method Details
-
generate
Method generate() is not used in MethodGen. They are replaced by the more granular interfaceMethod, stub, skeleton, dispatchSkeleton. -
interfaceMethod
-
stub
protected void stub(String className, boolean isAbstract, Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) -
localstub
protected void localstub(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index, InterfaceEntry i) -
skeleton
-
dispatchSkeleton
protected void dispatchSkeleton(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) -
isValueInitializer
protected boolean isValueInitializer()Determine whether method entry m is a valuetype initializer.- Returns:
- true if is m is valuetype initializer, false otherwise.
-
writeMethodSignature
protected void writeMethodSignature() -
writeParmType
-
writeDispatchCall
protected void writeDispatchCall() -
writeStubBody
-
writeStubBodyForLocalInvocation
-
writeLocalStubBody
-
writeInsert
private void writeInsert(String indent, String target, String source, SymtabEntry type, PrintWriter stream) -
writeType
-
writeExtract
private void writeExtract(String indent, String target, String source, SymtabEntry type, PrintWriter stream) -
writeExtract
-
writeSkeletonBody
private void writeSkeletonBody() -
passType
-
serverMethodName
This is only used by AttributeGen. The java mapping says the names should be getXXX and setXXX, but CORBA says they should be _get_XXX and _set_XXX. this.name () will be getXXX. realName is set by AttributeGen to _get_XXX. -
writeOutputStreamWrite
private void writeOutputStreamWrite(String indent, String oStream, String name, SymtabEntry type, PrintWriter stream) -
writeInputStreamRead
-
writeMethodCall
-
writeCreateReply
-