public abstract static class EclipseSingularsRecipes.EclipseSingularizer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected static long[] |
NULL_POSS |
Constructor and Description |
---|
EclipseSingularizer() |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.jdt.internal.compiler.ast.TypeReference |
addTypeArgs(int count,
boolean addExtends,
EclipseNode node,
org.eclipse.jdt.internal.compiler.ast.TypeReference type,
java.util.List<org.eclipse.jdt.internal.compiler.ast.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,
java.util.List<org.eclipse.jdt.internal.compiler.ast.Statement> statements,
char[] targetVariableName) |
void |
appendCleaningCode(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType,
java.util.List<org.eclipse.jdt.internal.compiler.ast.Statement> statements) |
boolean |
checkForAlreadyExistingNodesAndGenerateError(EclipseNode builderType,
EclipseSingularsRecipes.SingularData data)
Checks if any of the to-be-generated nodes (fields, methods) already exist.
|
protected org.eclipse.jdt.internal.compiler.ast.TypeReference |
cloneParamType(int index,
java.util.List<org.eclipse.jdt.internal.compiler.ast.TypeReference> typeArgs,
EclipseNode builderType) |
protected org.eclipse.jdt.internal.compiler.ast.TypeReference[] |
createTypeArgs(int count,
boolean addExtends,
EclipseNode node,
java.util.List<org.eclipse.jdt.internal.compiler.ast.TypeReference> typeArgs) |
abstract java.util.List<EclipseNode> |
generateFields(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
abstract void |
generateMethods(EclipseSingularsRecipes.SingularData data,
boolean deprecate,
EclipseNode builderType,
boolean fluent,
boolean chain) |
protected org.eclipse.jdt.internal.compiler.ast.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<java.lang.String> |
getSupportedTypes() |
java.util.List<char[]> |
listFieldsToBeGenerated(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
java.util.List<char[]> |
listMethodsToBeGenerated(EclipseSingularsRecipes.SingularData data,
EclipseNode builderType) |
boolean |
requiresCleaning() |
public abstract lombok.core.LombokImmutableList<java.lang.String> getSupportedTypes()
public boolean checkForAlreadyExistingNodesAndGenerateError(EclipseNode builderType, EclipseSingularsRecipes.SingularData data)
public java.util.List<char[]> listFieldsToBeGenerated(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public java.util.List<char[]> listMethodsToBeGenerated(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public abstract java.util.List<EclipseNode> generateFields(EclipseSingularsRecipes.SingularData data, EclipseNode builderType)
public abstract void generateMethods(EclipseSingularsRecipes.SingularData data, boolean deprecate, EclipseNode builderType, boolean fluent, boolean chain)
public abstract void appendBuildCode(EclipseSingularsRecipes.SingularData data, EclipseNode builderType, java.util.List<org.eclipse.jdt.internal.compiler.ast.Statement> statements, char[] targetVariableName)
public boolean requiresCleaning()
public void appendCleaningCode(EclipseSingularsRecipes.SingularData data, EclipseNode builderType, java.util.List<org.eclipse.jdt.internal.compiler.ast.Statement> statements)
protected org.eclipse.jdt.internal.compiler.ast.TypeReference addTypeArgs(int count, boolean addExtends, EclipseNode node, org.eclipse.jdt.internal.compiler.ast.TypeReference type, java.util.List<org.eclipse.jdt.internal.compiler.ast.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 org.eclipse.jdt.internal.compiler.ast.TypeReference[] createTypeArgs(int count, boolean addExtends, EclipseNode node, java.util.List<org.eclipse.jdt.internal.compiler.ast.TypeReference> typeArgs)
protected org.eclipse.jdt.internal.compiler.ast.Expression getSize(EclipseNode builderType, char[] name, boolean nullGuard)
protected org.eclipse.jdt.internal.compiler.ast.TypeReference cloneParamType(int index, java.util.List<org.eclipse.jdt.internal.compiler.ast.TypeReference> typeArgs, EclipseNode builderType)
Copyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.