public class JrpcgenDeclaration extends JrpcgenDocumentable implements JrpcgenItem, Cloneable
JrpcgenDeclaration class represents a single declaration
from an rpcgen "x"-file.| Modifier and Type | Class and Description |
|---|---|
static class |
JrpcgenDeclaration.Kind |
static class |
JrpcgenDeclaration.Table |
documentation| Constructor and Description |
|---|
JrpcgenDeclaration(String identifier,
JrpcgenTypeMapping typeMapping)
Constructs a
JrpcgenDeclaration and sets the identifier
and its data type. |
JrpcgenDeclaration(String identifier,
JrpcgenTypeMapping typeMapping,
JrpcgenDeclaration.Kind kind,
String size)
Constructs a
JrpcgenDeclaration and sets the identifier,
its data type, kind and size of vector. |
appendDeprecatedOrNothing, appendDeprecatedOrNothing, documentationIsEmpty, documentationIsProvided, emptyDocumentation, getDocumentation, getIdentedDocu, getIdentedDocu, isDeprecated, writeDocumentation, writeDocumentationpublic JrpcgenDeclaration(String identifier, JrpcgenTypeMapping typeMapping)
JrpcgenDeclaration and sets the identifier
and its data type. The kind of the
declaration is assumed to be JrpcgenDeclaration#SCALAR.identifier - Identifier to be declared.type - Data type the identifier is declared of.public JrpcgenDeclaration(String identifier, JrpcgenTypeMapping typeMapping, JrpcgenDeclaration.Kind kind, String size)
JrpcgenDeclaration and sets the identifier,
its data type, kind and size of vector. This constructur is typically
used when declaring either fixed-size or dynamic arrays.identifier - Identifier to be declared.type - Data type the identifier is declared of.kind - Kind of declaration (scalar, vector, indirection).size - Size of array (if fixed-sized or bounded, otherwise null).public final String getIdentifier()
JrpcgenItemnull.getIdentifier in interface JrpcgenItempublic final String getType()
public final String getJavaType()
public final JrpcgenTypeMapping getTypeMapping()
public final JrpcgenDeclaration.Kind getKind()
public final String getSize()
public void updateHash(JrpcgenSHA hash)
public void writeMemberDeclaration(JrpcgenJavaFile javaFile, String access, boolean initString)
public void writeGettersAndSetters(JrpcgenJavaFile javaFile)
public void writeEncodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)
public void writeEncodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context)
public void writeDecodingPart(JrpcgenJavaFile javaFile, String enclosure, JrpcgenContext context)
public void writeDecodingPart(JrpcgenJavaFile javaFile, String enclosure, String oref, JrpcgenContext context)
public void writeToStringPart(JrpcgenJavaFile javaFile)
public void writeEqualsPart(JrpcgenJavaFile javaFile, JrpcgenContext context)
public void writeEqualsExpression(JrpcgenJavaFile javaFile, boolean negate, JrpcgenContext context)
public void dump()
System.out.public <T extends Appendable> T dump(T appendable)
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic boolean isArray()
Copyright © 2025. All rights reserved.