public abstract static class EclipseSingularsRecipes.EclipseSingularizer extends Object
Modifier and Type | Field and Description |
---|---|
protected static long[] |
NULL_POSS |
Constructor and Description |
---|
EclipseSingularizer() |
Modifier and Type | Method and Description |
---|---|
protected TypeReference |
addTypeArgs(int count,
boolean addExtends,
EclipseNode node,
TypeReference type,
List<TypeReference> typeArgs)
Adds the requested number of type arguments to the provided type, copying each argument in
typeArgs . |
abstract void |
appendBuildCode(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType,
List<Statement> statements,
char[] targetVariableName) |
void |
appendCleaningCode(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType,
List<Statement> statements) |
boolean |
checkForAlreadyExistingNodesAndGenerateError(EclipseNode builderType,
EclipseSingularsRecipes.SingularData data)
Checks if any of the to-be-generated nodes (fields, methods) already exist.
|
protected TypeReference |
cloneParamType(int index,
List<TypeReference> typeArgs,
EclipseNode builderType) |
protected TypeReference[] |
createTypeArgs(int count,
boolean addExtends,
EclipseNode node,
List<TypeReference> typeArgs) |
abstract List<EclipseNode> |
generateFields(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
abstract void |
generateMethods(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType,
boolean fluent,
boolean chain) |
protected Expression |
getSize(EclipseNode builderType,
char[] name,
boolean nullGuard)
Generates 'this.name.size()' as an expression; if nullGuard is true, it's this.name == null ? 0 : this.name.size().
|
abstract lombok.core.LombokImmutableList<String> |
getSupportedTypes() |
List<char[]> |
listFieldsToBeGenerated(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
List<char[]> |
listMethodsToBeGenerated(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
boolean |
requiresCleaning() |
public abstract lombok.core.LombokImmutableList<String> getSupportedTypes()
public boolean checkForAlreadyExistingNodesAndGenerateError(EclipseNode builderType, EclipseSingularsRecipes.SingularData data)
public List<char[]> listFieldsToBeGenerated(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public List<char[]> listMethodsToBeGenerated(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public abstract List<EclipseNode> generateFields(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public abstract void generateMethods(EclipseSingularsRecipes.SingularData data, EclipseNode builderType, boolean fluent, boolean chain)
public abstract void appendBuildCode(EclipseSingularsRecipes.SingularData data, EclipseNode builderType, List<Statement> statements, char[] targetVariableName)
public boolean requiresCleaning()
public void appendCleaningCode(EclipseSingularsRecipes.SingularData data, EclipseNode builderType, List<Statement> statements)
protected TypeReference addTypeArgs(int count, boolean addExtends, EclipseNode node, TypeReference type, List<TypeReference> typeArgs)
typeArgs
. If typeArgs is too long, the extra elements are ignored.
If typeArgs
is null or too short, java.lang.Object
will be substituted for each missing type argument.count
- The number of type arguments requested.addExtends
- If true
, all bounds are either '? extends X' or just '?'. If false, the reverse is applied, and '? extends Foo' is converted to Foo, '?' to Object, etc.node
- Some node in the same AST. Just used to obtain makers and contexts and such.type
- The type to add generics to.typeArgs
- the list of type args to clone.source
- The source annotation that is the root cause of this code generation.protected TypeReference[] createTypeArgs(int count, boolean addExtends, EclipseNode node, List<TypeReference> typeArgs)
protected Expression getSize(EclipseNode builderType, char[] name, boolean nullGuard)
protected TypeReference cloneParamType(int index, List<TypeReference> typeArgs, EclipseNode builderType)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.