Package com.igormaznitsa.jbbp.compiler
Class JBBPCompiledBlock.Builder
java.lang.Object
com.igormaznitsa.jbbp.compiler.JBBPCompiledBlock.Builder
- Enclosing class:
JBBPCompiledBlock
Inside helper to build a compiled block
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a compiled block based on the data and check that all needed data is provided.setArraySizeEvaluators(List<JBBPIntegerValueEvaluator> evaluators) Set the variable size array evaluatorssetCompiledData(byte[] compiledData) Set the compiled data block.Set list of fields processed by custom type field processor.setHasVarFields(boolean flag) Set the flag that the compiled block has var fields or array.setNamedFieldData(List<JBBPNamedFieldInfo> namedFields) Set the named field info items.Set the source.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Build a compiled block based on the data and check that all needed data is provided.- Returns:
- a compiled block
- Throws:
NullPointerException- if needed info is not provided
-
setHasVarFields
Set the flag that the compiled block has var fields or array.- Parameters:
flag- the flag, true shows that the compiled block contains a var file, false otherwise- Returns:
- this object
-
setSource
Set the source.- Parameters:
source- the source for compiled block.- Returns:
- this object
-
setCompiledData
Set the compiled data block.- Parameters:
compiledData- the compiled data block.- Returns:
- this object
-
setNamedFieldData
Set the named field info items.- Parameters:
namedFields- named field info item list- Returns:
- this object
-
setArraySizeEvaluators
Set the variable size array evaluators- Parameters:
evaluators- list of evaluators, it can be null- Returns:
- this object
-
setCustomTypeFields
Set list of fields processed by custom type field processor.- Parameters:
list- list of field token info, it can be null- Returns:
- this object
-