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 int
private static final String
private static final String
protected boolean
protected boolean
protected MethodEntry
protected int
private static final String
protected String
protected PrintWriter
protected Hashtable
private static final String
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
dispatchSkeleton
(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) void
generate
(Hashtable symbolTable, MethodEntry m, PrintWriter stream) Method generate() is not used in MethodGen.protected void
interfaceMethod
(Hashtable symbolTable, MethodEntry m, PrintWriter stream) protected boolean
Determine whether method entry m is a valuetype initializer.protected void
localstub
(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index, InterfaceEntry i) protected String
passType
(int passType) protected void
serverMethodName
(String name) This is only used by AttributeGen.protected void
skeleton
(Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) protected void
stub
(String className, boolean isAbstract, Hashtable symbolTable, MethodEntry m, PrintWriter stream, int index) protected void
writeCreateReply
(String indent) protected void
private String
writeExtract
(String source, SymtabEntry type) private void
writeExtract
(String indent, String target, String source, SymtabEntry type, PrintWriter stream) private String
writeInputStreamRead
(String source, SymtabEntry type) private void
writeInsert
(String indent, String target, String source, SymtabEntry type, PrintWriter stream) protected void
protected void
writeMethodCall
(String indent) protected void
private void
writeOutputStreamWrite
(String indent, String oStream, String name, SymtabEntry type, PrintWriter stream) protected void
writeParmType
(SymtabEntry parm, int passType) private void
protected void
writeStubBody
(String className) private void
writeStubBodyForLocalInvocation
(String className, String methodName) This method writes the else part of the stub method invocation to enable local invocation in case of collocation.private void
writeType
(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
This method writes the else part of the stub method invocation to enable local invocation in case of collocation. NOTE: This will only be invoked from writeStubBody. -
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
-