Search in sources :

Example 41 with ParameterSpec

use of com.squareup.javapoet.ParameterSpec in project so by onap.

the class FluentGenerator method createInnerInfoClass.

protected TypeSpec createInnerInfoClass(ObjectType oType) {
    List<FieldSpec> classFields = new ArrayList<>();
    List<MethodSpec> methods = new ArrayList<>();
    classFields.add(FieldSpec.builder(String.class, "partialUri").addModifiers(Modifier.PRIVATE, Modifier.FINAL, Modifier.STATIC).initializer("$S", oType.getPartialUri()).build());
    classFields.add(FieldSpec.builder(ParameterizedTypeName.get(List.class, String.class), "paths").addModifiers(Modifier.PRIVATE, Modifier.FINAL, Modifier.STATIC).initializer("$T.asList($L)", ClassName.get(Arrays.class), "\"" + oType.getPaths().stream().collect(Collectors.joining("\", \"")) + "\"").build());
    if (oType.getType().equals("plural")) {
        Pair<String, String> path = splitClasspath(this.pluralFragmentClass);
        ClassName fragmentClass = ClassName.get(path.getLeft(), path.getRight());
        path = splitClasspath(this.baseBuilderClass);
        ClassName baseClass = ClassName.get(path.getLeft(), path.getRight());
        classFields.add(FieldSpec.builder(fragmentClass, "fragment").addModifiers(Modifier.PRIVATE, Modifier.FINAL, Modifier.STATIC).initializer("new $T(new $L(new $T(){}))", fragmentClass, upperCamel(oType.getName()), baseClass).build());
    }
    ClassName superInterface;
    String name;
    if (oType.getType().equals("plural")) {
        Pair<String, String> path = splitClasspath(this.pluralBuilderClass);
        superInterface = ClassName.get(path.getLeft(), path.getRight());
        name = oType.getAdditionalName();
    } else if (oType.getType().equals("singular")) {
        Pair<String, String> path = splitClasspath(this.singularBuilderClass);
        superInterface = ClassName.get(path.getLeft(), path.getRight());
        name = oType.getName();
    } else {
        Pair<String, String> path = splitClasspath(this.topLevelBuilderClass);
        superInterface = ClassName.get(path.getLeft(), path.getRight());
        name = oType.getName();
    }
    superInterface = superInterface.nestedClass("Info");
    methods.add(MethodSpec.methodBuilder("getPaths").returns(ParameterizedTypeName.get(List.class, String.class)).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement("return Info.paths").build());
    methods.add(MethodSpec.methodBuilder("getPartialUri").returns(String.class).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement("return Info.partialUri").build());
    if (oType.getType().equals("plural")) {
        Pair<String, String> path = splitClasspath(this.pluralFragmentClass);
        ClassName fragmentClass = ClassName.get(path.getLeft(), path.getRight());
        methods.add(MethodSpec.methodBuilder("getFragment").returns(fragmentClass).addModifiers(Modifier.PUBLIC).addStatement("return fragment").build());
    } else if (oType.getType().equals("singular")) {
        Pair<String, String> path = splitClasspath(this.singleFragmentClass);
        ClassName fragmentClass = ClassName.get(path.getLeft(), path.getRight());
        path = splitClasspath(this.baseBuilderClass);
        ClassName baseClass = ClassName.get(path.getLeft(), path.getRight());
        List<ParameterSpec> typeParams = new ArrayList<>();
        for (ObjectField oF : oType.getFields()) {
            if (oF.getType().equals("string")) {
                typeParams.add(ParameterSpec.builder(String.class, lowerCamel(makeValidJavaVariable(oF.getName()))).build());
            } else if (oF.getType().equals("integer")) {
                typeParams.add(ParameterSpec.builder(int.class, lowerCamel(makeValidJavaVariable(oF.getName()))).build());
            }
        }
        methods.add(MethodSpec.methodBuilder("getFragment").returns(fragmentClass).addParameters(typeParams).addModifiers(Modifier.PUBLIC).addStatement("return new $T(new $L(new $T(){}, $L))", fragmentClass, upperCamel(oType.getName()), baseClass, typeParams.stream().map(item -> item.name).collect(Collectors.joining(", "))).build());
    }
    if (!oType.getType().equals("top level")) {
        classFields.add(FieldSpec.builder(String.class, "name").addModifiers(Modifier.PRIVATE, Modifier.FINAL, Modifier.STATIC).initializer("$S", name).build());
        classFields.add(FieldSpec.builder(ClassName.get("", "UriParams"), "uriParams").addModifiers(Modifier.PRIVATE, Modifier.FINAL, Modifier.STATIC).initializer("new $T()", ClassName.get("", "UriParams")).build());
        methods.add(MethodSpec.methodBuilder("getName").returns(String.class).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement("return Info.name").build());
        methods.add(MethodSpec.methodBuilder("getUriParams").returns(ClassName.get("", "UriParams")).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement("return Info.uriParams").build());
    }
    TypeSpec.Builder returnTypeSpec = TypeSpec.classBuilder("Info").addModifiers(Modifier.PUBLIC, Modifier.STATIC).addSuperinterface(superInterface).addFields(classFields).addMethods(methods);
    if (!oType.getType().equals("top level")) {
        returnTypeSpec.addType(createUriParamsClass(superInterface, oType));
    }
    return returnTypeSpec.build();
}
Also used : Arrays(java.util.Arrays) ParameterSpec(com.squareup.javapoet.ParameterSpec) Modifier(javax.lang.model.element.Modifier) CaseFormat(com.google.common.base.CaseFormat) MethodSpec(com.squareup.javapoet.MethodSpec) FieldSpec(com.squareup.javapoet.FieldSpec) ClassName(com.squareup.javapoet.ClassName) IOException(java.io.IOException) ArrayUtils(org.apache.commons.lang3.ArrayUtils) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) Log(org.apache.maven.plugin.logging.Log) TypeSpec(com.squareup.javapoet.TypeSpec) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) JavaFile(com.squareup.javapoet.JavaFile) List(java.util.List) Matcher(java.util.regex.Matcher) Pair(org.apache.commons.lang3.tuple.Pair) Paths(java.nio.file.Paths) Map(java.util.Map) Entry(java.util.Map.Entry) Comparator(java.util.Comparator) CodeBlock(com.squareup.javapoet.CodeBlock) MethodSpec(com.squareup.javapoet.MethodSpec) ArrayList(java.util.ArrayList) FieldSpec(com.squareup.javapoet.FieldSpec) ClassName(com.squareup.javapoet.ClassName) ArrayList(java.util.ArrayList) List(java.util.List) Arrays(java.util.Arrays) Pair(org.apache.commons.lang3.tuple.Pair) TypeSpec(com.squareup.javapoet.TypeSpec)

Example 42 with ParameterSpec

use of com.squareup.javapoet.ParameterSpec in project so by onap.

the class FluentGenerator method createAccessMethod.

protected MethodSpec createAccessMethod(ObjectType oType, boolean isChild, boolean isStatic) {
    ClassName childClass = ClassName.get(CLASSPATH, upperCamel(oType.getName()));
    MethodSpec.Builder b = MethodSpec.methodBuilder(lowerCamel(oType.getName())).returns(childClass);
    List<Modifier> modifiers = new ArrayList<>();
    if (isStatic) {
        modifiers.add(Modifier.STATIC);
    }
    modifiers.add(Modifier.PUBLIC);
    b.addModifiers(modifiers);
    List<ParameterSpec> params = new ArrayList<>();
    for (ObjectField oF : doc.get(oType.getName()).getFields()) {
        if (oF.getType().equals("string")) {
            params.add(ParameterSpec.builder(String.class, lowerCamel(makeValidJavaVariable(oF.getName()))).build());
        } else if (oF.getType().equals("integer")) {
            params.add(ParameterSpec.builder(int.class, lowerCamel(makeValidJavaVariable(oF.getName()))).build());
        }
    }
    List<String> paramNames = params.stream().map(item -> item.name).collect(Collectors.toList());
    if (isChild) {
        paramNames.add(0, "this");
    }
    b.addParameters(params).addStatement("return new $T($L)", childClass, String.join(", ", paramNames));
    return b.build();
}
Also used : Arrays(java.util.Arrays) ParameterSpec(com.squareup.javapoet.ParameterSpec) Modifier(javax.lang.model.element.Modifier) CaseFormat(com.google.common.base.CaseFormat) MethodSpec(com.squareup.javapoet.MethodSpec) FieldSpec(com.squareup.javapoet.FieldSpec) ClassName(com.squareup.javapoet.ClassName) IOException(java.io.IOException) ArrayUtils(org.apache.commons.lang3.ArrayUtils) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) Log(org.apache.maven.plugin.logging.Log) TypeSpec(com.squareup.javapoet.TypeSpec) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) JavaFile(com.squareup.javapoet.JavaFile) List(java.util.List) Matcher(java.util.regex.Matcher) Pair(org.apache.commons.lang3.tuple.Pair) Paths(java.nio.file.Paths) Map(java.util.Map) Entry(java.util.Map.Entry) Comparator(java.util.Comparator) CodeBlock(com.squareup.javapoet.CodeBlock) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterSpec(com.squareup.javapoet.ParameterSpec) ClassName(com.squareup.javapoet.ClassName) ArrayList(java.util.ArrayList) Modifier(javax.lang.model.element.Modifier)

Example 43 with ParameterSpec

use of com.squareup.javapoet.ParameterSpec in project so by onap.

the class FluentGenerator method createInterfaceMethods.

protected List<MethodSpec> createInterfaceMethods(ObjectType oType, List<ParameterSpec> typeParams) {
    List<MethodSpec> methods = new ArrayList<>();
    CodeBlock.Builder uriTemplateCodeBlock = CodeBlock.builder();
    if (!oType.getType().equals("top level")) {
        uriTemplateCodeBlock.add("return this.parentObj.uriTemplate() + Info.partialUri");
    } else {
        uriTemplateCodeBlock.add("return Info.partialUri");
    }
    methods.add(MethodSpec.methodBuilder("uriTemplate").returns(String.class).addModifiers(Modifier.PUBLIC).addStatement(uriTemplateCodeBlock.build()).addAnnotation(Override.class).build());
    ClassName arrayUtils = ClassName.get(ArrayUtils.class);
    CodeBlock.Builder valuesReturn = CodeBlock.builder();
    if (oType.getType().equals("top level")) {
        valuesReturn.add("return new Object[0]");
    } else {
        if (!typeParams.isEmpty()) {
            valuesReturn.add("return $T.addAll(this.parentObj.values(), $L)", arrayUtils, String.join(", ", typeParams.stream().map(item -> "this." + item.name).collect(Collectors.toList())));
        } else {
            valuesReturn.add("return this.parentObj.values()");
        }
    }
    methods.add(MethodSpec.methodBuilder("values").returns(Object[].class).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement(valuesReturn.build()).build());
    if (!oType.getType().equals("top level")) {
        ClassName returnType = null;
        CodeBlock.Builder block = CodeBlock.builder();
        if (oType.getType().equals("singular")) {
            Pair<String, String> path = splitClasspath(this.singularClass);
            returnType = ClassName.get(path.getLeft(), path.getRight());
            block.add("return new $T(this.parentObj.uriTemplate(), Info.partialUri, Info.name, false)", returnType);
        } else if (oType.getType().equals("plural")) {
            Pair<String, String> path = splitClasspath(this.pluralClass);
            returnType = ClassName.get(path.getLeft(), path.getRight());
            block.add("return new $T(Info.name, this.parentObj.uriTemplate(), Info.partialUri)", returnType);
        }
        methods.add(MethodSpec.methodBuilder("build").returns(returnType).addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addStatement(block.build()).build());
    }
    return methods;
}
Also used : Arrays(java.util.Arrays) ParameterSpec(com.squareup.javapoet.ParameterSpec) Modifier(javax.lang.model.element.Modifier) CaseFormat(com.google.common.base.CaseFormat) MethodSpec(com.squareup.javapoet.MethodSpec) FieldSpec(com.squareup.javapoet.FieldSpec) ClassName(com.squareup.javapoet.ClassName) IOException(java.io.IOException) ArrayUtils(org.apache.commons.lang3.ArrayUtils) JsonProcessingException(com.fasterxml.jackson.core.JsonProcessingException) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) Log(org.apache.maven.plugin.logging.Log) TypeSpec(com.squareup.javapoet.TypeSpec) Collectors(java.util.stream.Collectors) ArrayList(java.util.ArrayList) JavaFile(com.squareup.javapoet.JavaFile) List(java.util.List) Matcher(java.util.regex.Matcher) Pair(org.apache.commons.lang3.tuple.Pair) Paths(java.nio.file.Paths) Map(java.util.Map) Entry(java.util.Map.Entry) Comparator(java.util.Comparator) CodeBlock(com.squareup.javapoet.CodeBlock) MethodSpec(com.squareup.javapoet.MethodSpec) ArrayList(java.util.ArrayList) CodeBlock(com.squareup.javapoet.CodeBlock) ClassName(com.squareup.javapoet.ClassName) Pair(org.apache.commons.lang3.tuple.Pair)

Example 44 with ParameterSpec

use of com.squareup.javapoet.ParameterSpec in project celesta by CourseOrchestra.

the class CursorGenerator method buildConstructors.

private static List<MethodSpec> buildConstructors(GrainElement ge, TypeName columnsClassType) {
    List<MethodSpec> results = new ArrayList<>();
    ParameterSpec contextParam = ParameterSpec.builder(CallContext.class, "context").build();
    ParameterSpec fieldsParam = ParameterSpec.builder(ParameterizedTypeName.get(Set.class, String.class), "fields").build();
    ParameterSpec columnsParam = ParameterSpec.builder(ArrayTypeName.of(ParameterizedTypeName.get(ClassName.get(ColumnMeta.class), WildcardTypeName.subtypeOf(Object.class))), "columns").build();
    ParameterSpec parametersParam = ParameterSpec.builder(ParameterizedTypeName.get(Map.class, String.class, Object.class), "parameters").build();
    Supplier<MethodSpec.Builder> msp = () -> MethodSpec.constructorBuilder().addModifiers(Modifier.PUBLIC).addParameter(contextParam);
    // Common constructor
    MethodSpec.Builder builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(parametersParam);
        builder.addStatement("super(context, parameters)");
    } else {
        builder.addStatement("super(context)");
    }
    results.add(builder.build());
    if (ge instanceof SequenceElement) {
        return results;
    }
    // Constructor with columns limitation
    builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(parametersParam);
        builder.addParameter(columnsParam).varargs();
        builder.addStatement("super(context, parameters, columns)");
    } else {
        builder.addParameter(columnsParam).varargs();
        builder.addStatement("super(context, columns)");
    }
    results.add(builder.build());
    // Deprecated constructor with fields limitation
    builder = msp.get();
    if (ge instanceof ParameterizedView) {
        builder.addParameter(fieldsParam);
        builder.addParameter(parametersParam);
        builder.addStatement("super(context, fields, parameters)");
    } else {
        builder.addParameter(fieldsParam);
        builder.addStatement("super(context, fields)");
    }
    results.add(builder.addAnnotation(Deprecated.class).build());
    // ParameterizedView constructors
    if (ge instanceof ParameterizedView) {
        ParameterizedView pv = (ParameterizedView) ge;
        builder = msp.get();
        for (Parameter parameter : pv.getParameters().values()) {
            builder.addParameter(ParameterSpec.builder(parameter.getJavaClass(), parameter.getName()).build());
        }
        String spec = "super (context, paramsMap(" + pv.getParameters().values().stream().map(c -> "$N").collect(Collectors.joining(", ")) + "))";
        builder.addStatement(spec, pv.getParameters().keySet().toArray());
        results.add(builder.build());
        builder = msp.get();
        for (Parameter parameter : pv.getParameters().values()) {
            builder.addParameter(ParameterSpec.builder(parameter.getJavaClass(), parameter.getName()).build());
        }
        builder.addParameter(columnsParam).varargs();
        spec = "super (context, paramsMap(" + pv.getParameters().values().stream().map(c -> "$N").collect(Collectors.joining(", ")) + "), columns)";
        builder.addStatement(spec, pv.getParameters().keySet().toArray());
        results.add(builder.build());
        results.add(getParameterizedViewTypedConstructorHelper(pv));
    }
    return results;
}
Also used : BasicCursor(ru.curs.celesta.dbutils.BasicCursor) Arrays(java.util.Arrays) Modifier(javax.lang.model.element.Modifier) CelestaException(ru.curs.celesta.CelestaException) ZonedDateTime(java.time.ZonedDateTime) ClassName(com.squareup.javapoet.ClassName) SequenceElement(ru.curs.celesta.score.SequenceElement) Grain(ru.curs.celesta.score.Grain) Parameter(ru.curs.celesta.score.Parameter) ColumnMeta(ru.curs.celesta.score.ColumnMeta) Generated(javax.annotation.Generated) StringColumn(ru.curs.celesta.score.StringColumn) ResultSet(java.sql.ResultSet) Map(java.util.Map) ICelesta(ru.curs.celesta.ICelesta) ZoneOffset(java.time.ZoneOffset) DataGrainElement(ru.curs.celesta.score.DataGrainElement) CelestaGenerated(ru.curs.celesta.dbutils.CelestaGenerated) ParameterSpec(com.squareup.javapoet.ParameterSpec) CallContext(ru.curs.celesta.CallContext) TimeZone(java.util.TimeZone) Timestamp(java.sql.Timestamp) Collection(java.util.Collection) Set(java.util.Set) Column(ru.curs.celesta.score.Column) Collectors(java.util.stream.Collectors) JavaFile(com.squareup.javapoet.JavaFile) Objects(java.util.Objects) List(java.util.List) ViewCursor(ru.curs.celesta.dbutils.ViewCursor) TriggerType(ru.curs.celesta.event.TriggerType) BasicTable(ru.curs.celesta.score.BasicTable) GrainElement(ru.curs.celesta.score.GrainElement) BasicDataAccessor(ru.curs.celesta.dbutils.BasicDataAccessor) TypeName(com.squareup.javapoet.TypeName) Optional(java.util.Optional) IntegerColumn(ru.curs.celesta.score.IntegerColumn) MaterializedViewCursor(ru.curs.celesta.dbutils.MaterializedViewCursor) ZonedDateTimeColumn(ru.curs.celesta.score.ZonedDateTimeColumn) FieldSpec(com.squareup.javapoet.FieldSpec) TableElement(ru.curs.celesta.score.TableElement) LocalDateTime(java.time.LocalDateTime) WildcardTypeName(com.squareup.javapoet.WildcardTypeName) Cursor(ru.curs.celesta.dbutils.Cursor) HashMap(java.util.HashMap) View(ru.curs.celesta.score.View) ReadOnlyTable(ru.curs.celesta.score.ReadOnlyTable) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) SQLException(java.sql.SQLException) Calendar(java.util.Calendar) Sequence(ru.curs.celesta.dbutils.Sequence) BinaryColumn(ru.curs.celesta.score.BinaryColumn) ParameterizedView(ru.curs.celesta.score.ParameterizedView) CodeBlock(com.squareup.javapoet.CodeBlock) LinkedHashSet(java.util.LinkedHashSet) Iterator(java.util.Iterator) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) IOException(java.io.IOException) CursorIterator(ru.curs.celesta.dbutils.CursorIterator) TypeSpec(com.squareup.javapoet.TypeSpec) ParameterizedViewCursor(ru.curs.celesta.dbutils.ParameterizedViewCursor) MaterializedView(ru.curs.celesta.score.MaterializedView) Table(ru.curs.celesta.score.Table) File(java.io.File) Consumer(java.util.function.Consumer) AnnotationSpec(com.squareup.javapoet.AnnotationSpec) VersionedElement(ru.curs.celesta.score.VersionedElement) DateTimeFormatter(java.time.format.DateTimeFormatter) NamedElement(ru.curs.celesta.score.NamedElement) FileResource(ru.curs.celesta.score.io.FileResource) ReadOnlyTableCursor(ru.curs.celesta.dbutils.ReadOnlyTableCursor) Collections(java.util.Collections) ArrayTypeName(com.squareup.javapoet.ArrayTypeName) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterSpec(com.squareup.javapoet.ParameterSpec) SequenceElement(ru.curs.celesta.score.SequenceElement) ArrayList(java.util.ArrayList) CallContext(ru.curs.celesta.CallContext) Parameter(ru.curs.celesta.score.Parameter) ParameterizedView(ru.curs.celesta.score.ParameterizedView)

Example 45 with ParameterSpec

use of com.squareup.javapoet.ParameterSpec in project celesta by CourseOrchestra.

the class CursorGenerator method buildClearBuffer.

private MethodSpec buildClearBuffer(Map<String, ? extends ColumnMeta<?>> columns, Set<Column<?>> pk) {
    ParameterSpec param = ParameterSpec.builder(boolean.class, "withKeys").build();
    MethodSpec.Builder builder = MethodSpec.methodBuilder("_clearBuffer").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).addParameter(param);
    if (!pk.isEmpty()) {
        builder.beginControlFlow("if ($N)", param.name);
        pk.stream().forEach(c -> builder.addStatement("this.$N = null", camelize(c.getName())));
        builder.endControlFlow();
    }
    columns.entrySet().stream().filter(e -> !pk.contains(e.getValue())).forEach(e -> builder.addStatement("this.$N = null", camelize(e.getKey())));
    return builder.build();
}
Also used : BasicCursor(ru.curs.celesta.dbutils.BasicCursor) Arrays(java.util.Arrays) Modifier(javax.lang.model.element.Modifier) CelestaException(ru.curs.celesta.CelestaException) ZonedDateTime(java.time.ZonedDateTime) ClassName(com.squareup.javapoet.ClassName) SequenceElement(ru.curs.celesta.score.SequenceElement) Grain(ru.curs.celesta.score.Grain) Parameter(ru.curs.celesta.score.Parameter) ColumnMeta(ru.curs.celesta.score.ColumnMeta) Generated(javax.annotation.Generated) StringColumn(ru.curs.celesta.score.StringColumn) ResultSet(java.sql.ResultSet) Map(java.util.Map) ICelesta(ru.curs.celesta.ICelesta) ZoneOffset(java.time.ZoneOffset) DataGrainElement(ru.curs.celesta.score.DataGrainElement) CelestaGenerated(ru.curs.celesta.dbutils.CelestaGenerated) ParameterSpec(com.squareup.javapoet.ParameterSpec) CallContext(ru.curs.celesta.CallContext) TimeZone(java.util.TimeZone) Timestamp(java.sql.Timestamp) Collection(java.util.Collection) Set(java.util.Set) Column(ru.curs.celesta.score.Column) Collectors(java.util.stream.Collectors) JavaFile(com.squareup.javapoet.JavaFile) Objects(java.util.Objects) List(java.util.List) ViewCursor(ru.curs.celesta.dbutils.ViewCursor) TriggerType(ru.curs.celesta.event.TriggerType) BasicTable(ru.curs.celesta.score.BasicTable) GrainElement(ru.curs.celesta.score.GrainElement) BasicDataAccessor(ru.curs.celesta.dbutils.BasicDataAccessor) TypeName(com.squareup.javapoet.TypeName) Optional(java.util.Optional) IntegerColumn(ru.curs.celesta.score.IntegerColumn) MaterializedViewCursor(ru.curs.celesta.dbutils.MaterializedViewCursor) ZonedDateTimeColumn(ru.curs.celesta.score.ZonedDateTimeColumn) FieldSpec(com.squareup.javapoet.FieldSpec) TableElement(ru.curs.celesta.score.TableElement) LocalDateTime(java.time.LocalDateTime) WildcardTypeName(com.squareup.javapoet.WildcardTypeName) Cursor(ru.curs.celesta.dbutils.Cursor) HashMap(java.util.HashMap) View(ru.curs.celesta.score.View) ReadOnlyTable(ru.curs.celesta.score.ReadOnlyTable) Function(java.util.function.Function) Supplier(java.util.function.Supplier) ArrayList(java.util.ArrayList) LinkedHashMap(java.util.LinkedHashMap) SQLException(java.sql.SQLException) Calendar(java.util.Calendar) Sequence(ru.curs.celesta.dbutils.Sequence) BinaryColumn(ru.curs.celesta.score.BinaryColumn) ParameterizedView(ru.curs.celesta.score.ParameterizedView) CodeBlock(com.squareup.javapoet.CodeBlock) LinkedHashSet(java.util.LinkedHashSet) Iterator(java.util.Iterator) MethodSpec(com.squareup.javapoet.MethodSpec) ParameterizedTypeName(com.squareup.javapoet.ParameterizedTypeName) IOException(java.io.IOException) CursorIterator(ru.curs.celesta.dbutils.CursorIterator) TypeSpec(com.squareup.javapoet.TypeSpec) ParameterizedViewCursor(ru.curs.celesta.dbutils.ParameterizedViewCursor) MaterializedView(ru.curs.celesta.score.MaterializedView) Table(ru.curs.celesta.score.Table) File(java.io.File) Consumer(java.util.function.Consumer) AnnotationSpec(com.squareup.javapoet.AnnotationSpec) VersionedElement(ru.curs.celesta.score.VersionedElement) DateTimeFormatter(java.time.format.DateTimeFormatter) NamedElement(ru.curs.celesta.score.NamedElement) FileResource(ru.curs.celesta.score.io.FileResource) ReadOnlyTableCursor(ru.curs.celesta.dbutils.ReadOnlyTableCursor) Collections(java.util.Collections) ArrayTypeName(com.squareup.javapoet.ArrayTypeName) ParameterSpec(com.squareup.javapoet.ParameterSpec) MethodSpec(com.squareup.javapoet.MethodSpec)

Aggregations

ParameterSpec (com.squareup.javapoet.ParameterSpec)97 MethodSpec (com.squareup.javapoet.MethodSpec)59 ParameterizedTypeName (com.squareup.javapoet.ParameterizedTypeName)40 ArrayList (java.util.ArrayList)34 TypeName (com.squareup.javapoet.TypeName)30 ClassName (com.squareup.javapoet.ClassName)27 TypeSpec (com.squareup.javapoet.TypeSpec)26 Map (java.util.Map)26 CodeBlock (com.squareup.javapoet.CodeBlock)23 FieldSpec (com.squareup.javapoet.FieldSpec)22 List (java.util.List)20 HashMap (java.util.HashMap)18 AnnotationSpec (com.squareup.javapoet.AnnotationSpec)17 JavaFile (com.squareup.javapoet.JavaFile)13 Modifier (javax.lang.model.element.Modifier)13 TypeElement (javax.lang.model.element.TypeElement)13 Collectors (java.util.stream.Collectors)12 IOException (java.io.IOException)11 Element (javax.lang.model.element.Element)11 TypeMirror (javax.lang.model.type.TypeMirror)11