Package org.acplt.oncrpc.apps.jrpcgen
Class JrpcgenDeclaration
java.lang.Object
org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable
org.acplt.oncrpc.apps.jrpcgen.JrpcgenDeclaration
- All Implemented Interfaces:
Cloneable,JrpcgenItem
The
JrpcgenDeclaration class represents a single declaration
from an rpcgen "x"-file.- Version:
- $Revision: 1.2 $ $Date: 2003/08/14 08:08:34 $ $State: Exp $ $Locker: $
- Author:
- Harald Albrecht
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic class -
Field Summary
Fields inherited from class org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable
documentation -
Constructor Summary
ConstructorsConstructorDescriptionJrpcgenDeclaration(String identifier, JrpcgenTypeMapping typeMapping) Constructs aJrpcgenDeclarationand sets the identifier and its data type.JrpcgenDeclaration(String identifier, JrpcgenTypeMapping typeMapping, JrpcgenDeclaration.Kind kind, String size) Constructs aJrpcgenDeclarationand sets the identifier, its data type, kind and size of vector. -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones declaration object.voiddump()Dumps the declaration toSystem.out.<T extends Appendable>
Tdump(T appendable) final StringDelivers the identifier of this item.final Stringfinal JrpcgenDeclaration.KindgetKind()final StringgetSize()final StringgetType()final JrpcgenTypeMappingbooleanisArray()toString()Returns the identifier.voidupdateHash(JrpcgenSHA hash) voidwriteDecodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context) voidwriteDecodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context) voidwriteEncodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context) voidwriteEncodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context) voidwriteEqualsExpression(JrpcgenJavaFile javaFile, boolean negate, JrpcgenContext context) voidwriteEqualsPart(JrpcgenJavaFile javaFile, JrpcgenContext context) voidwriteGettersAndSetters(JrpcgenJavaFile javaFile) voidwriteMemberDeclaration(JrpcgenJavaFile javaFile, String access, boolean initString) voidwriteToStringPart(JrpcgenJavaFile javaFile) Methods inherited from class org.acplt.oncrpc.apps.jrpcgen.JrpcgenDocumentable
appendDeprecatedOrNothing, appendDeprecatedOrNothing, documentationIsEmpty, documentationIsProvided, emptyDocumentation, getDocumentation, getIdentedDocu, getIdentedDocu, isDeprecated, writeDocumentation, writeDocumentation
-
Constructor Details
-
JrpcgenDeclaration
Constructs aJrpcgenDeclarationand sets the identifier and its data type. Thekindof the declaration is assumed to be.invalid reference
JrpcgenDeclaration#SCALAR- Parameters:
identifier- Identifier to be declared.type- Data type the identifier is declared of.
-
JrpcgenDeclaration
public JrpcgenDeclaration(String identifier, JrpcgenTypeMapping typeMapping, JrpcgenDeclaration.Kind kind, String size) Constructs aJrpcgenDeclarationand sets the identifier, its data type, kind and size of vector. This constructur is typically used when declaring either fixed-size or dynamic arrays.- Parameters:
identifier- Identifier to be declared.kind- Kind of declaration (scalar, vector, indirection).size- Size of array (if fixed-sized or bounded, otherwisenull).type- Data type the identifier is declared of.
-
-
Method Details
-
getIdentifier
Description copied from interface:JrpcgenItemDelivers the identifier of this item. This value must not benull.- Specified by:
getIdentifierin interfaceJrpcgenItem- Returns:
- The idnetifier of this item.
-
getType
-
getJavaType
-
getTypeMapping
-
getKind
-
getSize
-
updateHash
-
writeMemberDeclaration
-
writeGettersAndSetters
-
writeEncodingPart
-
writeEncodingPart
public void writeEncodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context) -
writeDecodingPart
-
writeDecodingPart
public void writeDecodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context) -
writeToStringPart
-
writeEqualsPart
-
writeEqualsExpression
-
toString
Returns the identifier. -
dump
public void dump()Dumps the declaration toSystem.out. -
dump
-
clone
Clones declaration object.- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
isArray
public boolean isArray()- Returns:
- true if the type of this declaration is a java array (string is no java array).
-