Package org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenUnionArm
java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.JrpcgenUnionArm
The
JrpcgenUnionArm class represents a single union arm defined
for a particular union in an rpcgen "x"-file.- Version:
- $Revision: 1.2 $ $Date: 2003/08/14 08:09:59 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
Field Summary
FieldsModifier and TypeFieldDescriptionAttribute element of descriminated arm (of classJrpcgenDeclaration).Value for which the descriminated union arm is valid. -
Constructor Summary
ConstructorsConstructorDescriptionJrpcgenUnionArm(String value, JrpcgenDeclaration element) Constructs aJrpcgenUnionArmand sets decrimated arm's value and the associated attribute element. -
Method Summary
Modifier and TypeMethodDescriptionvoiddump()Dumps the union arm toSystem.out.<T extends Appendable>
Tdump(T appendable) voidendCase(JrpcgenJavaFile javaFile) booleanbooleanbooleanbooleanvoidstartCase(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context) toString()voidupdateHash(JrpcgenSHA hash) voidwriteConstructorArm(JrpcgenJavaFile javaFile, String valueName, JrpcgenContext context) voidwriteDecodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context) voidwriteEncodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context) voidwriteEqualsPart(JrpcgenJavaFile javaFile, JrpcgenContext context) voidwriteMemberDeclaration(JrpcgenJavaFile javaFile, String access, boolean initString) voidwriteToStringPart(JrpcgenJavaFile javaFile, JrpcgenContext context)
-
Field Details
-
value
Value for which the descriminated union arm is valid. -
element
Attribute element of descriminated arm (of classJrpcgenDeclaration).
-
-
Constructor Details
-
JrpcgenUnionArm
Constructs aJrpcgenUnionArmand sets decrimated arm's value and the associated attribute element.- Parameters:
value- Value for which descriminated arm is valid.element- Descriminated arm element of classJrpcgenDeclaration.
-
-
Method Details
-
mapsToFollowingArm
public boolean mapsToFollowingArm() -
isDefaultArm
public boolean isDefaultArm() -
hasVoidType
public boolean hasVoidType() -
hasPayload
public boolean hasPayload() -
updateHash
-
writeMemberDeclaration
-
startCase
-
endCase
-
writeConstructorArm
-
writeEncodingPart
-
writeDecodingPart
-
writeToStringPart
-
writeEqualsPart
-
toString
-
dump
public void dump()Dumps the union arm toSystem.out. -
dump
-