Class FieldVisitor
- java.lang.Object
-
- org.cakelab.blender.typemap.NameMapping
-
- org.cakelab.blender.generator.utils.CodeGenerator
-
- org.cakelab.blender.generator.utils.FieldVisitor
-
- Direct Known Subclasses:
CFacadeFieldDescGenerator
,MethodGenerator
public abstract class FieldVisitor extends CodeGenerator
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassGenerator
classgen
-
Fields inherited from class org.cakelab.blender.generator.utils.CodeGenerator
indent, NL, TAB
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldVisitor(ClassGenerator classGenerator, int initialIndent)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
appendFieldDoc(GComment javadoc)
protected java.lang.String
getClassTypeName(CType ctype, JavaType jtype)
protected java.lang.String
getFieldDoc()
protected java.lang.String
getFieldType(CType ctype, JavaType jtype)
protected java.lang.Class<?>
getScalarJavaObjectType(CType ctype, JavaType jtype)
protected java.lang.String
getTemplateParameter(CType ctype, JavaType jtype)
protected java.lang.String
getTypeList(JavaType jtype, CType ctype)
protected abstract void
visitArray(long offset32, long offset64, CField field, JavaType jtype)
void
visitField(long offset32, long offset64, CStruct struct, CField field, JavaType jtype)
protected abstract void
visitPointer(long offset32, long offset64, CField field, JavaType jtype)
protected abstract void
visitScalar(long offset32, long offset64, CField field, JavaType jtype)
protected abstract void
visitStruct(long offset32, long offset64, CField field, JavaType jtype)
-
Methods inherited from class org.cakelab.blender.generator.utils.CodeGenerator
getIndentString, indent, reset
-
Methods inherited from class org.cakelab.blender.typemap.NameMapping
getFieldDescriptorName, mangle, mapClass2Struct, mapStruct2Class, toCamelCase, toFirstLowerCase, toGetterMethodName, toSetterMethodName
-
-
-
-
Field Detail
-
classgen
protected ClassGenerator classgen
-
-
Constructor Detail
-
FieldVisitor
protected FieldVisitor(ClassGenerator classGenerator, int initialIndent)
-
-
Method Detail
-
visitField
public void visitField(long offset32, long offset64, CStruct struct, CField field, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
visitArray
protected abstract void visitArray(long offset32, long offset64, CField field, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
visitPointer
protected abstract void visitPointer(long offset32, long offset64, CField field, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
visitScalar
protected abstract void visitScalar(long offset32, long offset64, CField field, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
visitStruct
protected abstract void visitStruct(long offset32, long offset64, CField field, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
getFieldDoc
protected java.lang.String getFieldDoc()
-
appendFieldDoc
protected void appendFieldDoc(GComment javadoc)
-
getFieldType
protected java.lang.String getFieldType(CType ctype, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
getTemplateParameter
protected java.lang.String getTemplateParameter(CType ctype, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
getScalarJavaObjectType
protected java.lang.Class<?> getScalarJavaObjectType(CType ctype, JavaType jtype) throws java.io.IOException
- Throws:
java.io.IOException
-
getTypeList
protected java.lang.String getTypeList(JavaType jtype, CType ctype) throws java.io.IOException
- Throws:
java.io.IOException
-
-