public class ClassGenerator<T> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassGenerator.BlkCreateMode |
static class |
ClassGenerator.BlockType |
static class |
ClassGenerator.HoldingContainer
Represents a (Nullable)?(Type)Holder instance.
|
| Modifier and Type | Field and Description |
|---|---|
com.sun.codemodel.JDefinedClass |
clazz |
static GeneratorMapping |
DEFAULT_CONSTANT_MAP |
static GeneratorMapping |
DEFAULT_SCALAR_MAP |
| Modifier and Type | Method and Description |
|---|---|
ClassGenerator.HoldingContainer |
addExpr(LogicalExpression ex) |
ClassGenerator.HoldingContainer |
addExpr(LogicalExpression ex,
ClassGenerator.BlkCreateMode mode) |
protected com.sun.codemodel.JBlock |
createInnerEvalBlock()
Creates an inner braced and indented block for evaluation of the expression.
|
ClassGenerator.HoldingContainer |
declare(TypeProtos.MajorType t) |
ClassGenerator.HoldingContainer |
declare(TypeProtos.MajorType t,
boolean includeNewInstance) |
com.sun.codemodel.JVar |
declareClassField(String prefix,
com.sun.codemodel.JType t) |
com.sun.codemodel.JVar |
declareClassField(String prefix,
com.sun.codemodel.JType t,
com.sun.codemodel.JExpression init) |
com.sun.codemodel.JVar |
declareVectorValueSetupAndMember(DirectExpression batchName,
TypedFieldId fieldId)
Creates class variable for the value vector using metadata from
fieldId
and initializes it using setup blocks. |
com.sun.codemodel.JVar |
declareVectorValueSetupAndMember(String batchName,
TypedFieldId fieldId) |
com.sun.codemodel.JBlock |
getBlock(ClassGenerator.BlockType type) |
com.sun.codemodel.JBlock |
getBlock(String methodName) |
com.sun.codemodel.JBlock |
getCleanupBlock() |
CodeGenerator<T> |
getCodeGenerator() |
static MappingSet |
getDefaultMapping() |
com.sun.codemodel.JBlock |
getEvalBlock() |
com.sun.codemodel.JLabel |
getEvalBlockLabel(String prefix) |
com.sun.codemodel.JType |
getHolderType(TypeProtos.MajorType t) |
ClassGenerator<T> |
getInnerGenerator(String name) |
MappingSet |
getMappingSet() |
com.sun.codemodel.JCodeModel |
getModel() |
String |
getNextVar() |
String |
getNextVar(String prefix) |
com.sun.codemodel.JBlock |
getResetBlock() |
com.sun.codemodel.JBlock |
getSetupBlock() |
List<TypedFieldId> |
getWorkspaceTypes() |
Map<WorkspaceReference,com.sun.codemodel.JVar> |
getWorkspaceVectors() |
void |
nestEvalBlock(com.sun.codemodel.JBlock block) |
void |
preparePlainJava()
Prepare the generated class for use as a plain-old Java class
(to be compiled by a compiler and directly loaded without a
byte-code merge.
|
void |
rotateBlock() |
void |
setMappingSet(MappingSet mappings) |
void |
unNestEvalBlock() |
public static final GeneratorMapping DEFAULT_SCALAR_MAP
public static final GeneratorMapping DEFAULT_CONSTANT_MAP
public final com.sun.codemodel.JDefinedClass clazz
public static MappingSet getDefaultMapping()
public ClassGenerator<T> getInnerGenerator(String name)
public MappingSet getMappingSet()
public void setMappingSet(MappingSet mappings)
public CodeGenerator<T> getCodeGenerator()
public com.sun.codemodel.JBlock getBlock(String methodName)
public com.sun.codemodel.JBlock getBlock(ClassGenerator.BlockType type)
public com.sun.codemodel.JBlock getSetupBlock()
public com.sun.codemodel.JBlock getEvalBlock()
public com.sun.codemodel.JBlock getResetBlock()
public com.sun.codemodel.JBlock getCleanupBlock()
public void nestEvalBlock(com.sun.codemodel.JBlock block)
public void unNestEvalBlock()
public com.sun.codemodel.JLabel getEvalBlockLabel(String prefix)
protected com.sun.codemodel.JBlock createInnerEvalBlock()
public com.sun.codemodel.JVar declareVectorValueSetupAndMember(String batchName, TypedFieldId fieldId)
public com.sun.codemodel.JVar declareVectorValueSetupAndMember(DirectExpression batchName, TypedFieldId fieldId)
fieldId
and initializes it using setup blocks.batchName - expression for invoking getValueAccessorById methodfieldId - metadata of the field that should be declaredpublic ClassGenerator.HoldingContainer addExpr(LogicalExpression ex)
public ClassGenerator.HoldingContainer addExpr(LogicalExpression ex, ClassGenerator.BlkCreateMode mode)
public void rotateBlock()
public com.sun.codemodel.JCodeModel getModel()
public String getNextVar()
public com.sun.codemodel.JVar declareClassField(String prefix, com.sun.codemodel.JType t)
public com.sun.codemodel.JVar declareClassField(String prefix, com.sun.codemodel.JType t, com.sun.codemodel.JExpression init)
public ClassGenerator.HoldingContainer declare(TypeProtos.MajorType t)
public ClassGenerator.HoldingContainer declare(TypeProtos.MajorType t, boolean includeNewInstance)
public List<TypedFieldId> getWorkspaceTypes()
public Map<WorkspaceReference,com.sun.codemodel.JVar> getWorkspaceVectors()
public void preparePlainJava()
public com.sun.codemodel.JType getHolderType(TypeProtos.MajorType t)
Copyright © 2017 The Apache Software Foundation. All rights reserved.