Skip to content

Commit

Permalink
[1.3.0-SNAPSHOT]
Browse files Browse the repository at this point in the history
Code style applied
  • Loading branch information
GoodforGod committed Dec 5, 2021
1 parent 17eeffe commit 1f08f29
Show file tree
Hide file tree
Showing 45 changed files with 54 additions and 99 deletions.
7 changes: 3 additions & 4 deletions src/main/java/io/goodforgod/dummymapper/MapperAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
import io.goodforgod.dummymapper.ui.ConfigDialog;
import io.goodforgod.dummymapper.ui.config.IConfig;
import io.goodforgod.dummymapper.util.IdeaUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import javax.swing.*;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collection;
import java.util.StringJoiner;
import javax.swing.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* Mapper entry point base implementation class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import io.leangen.graphql.execution.GlobalEnvironment;
import io.leangen.graphql.metadata.strategy.value.jackson.JacksonValueMapper;
import io.leangen.graphql.metadata.strategy.value.jackson.JacksonValueMapperFactory;

import java.lang.reflect.Constructor;
import java.util.List;
import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
import io.goodforgod.dummymapper.marker.Marker;
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import org.jetbrains.annotations.NotNull;

/**
* Filters out {@link AnnotationMarker} from {@link Marker} which are not qualified to {@link #allowed()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import org.apache.avro.reflect.AvroIgnore;
import org.apache.avro.reflect.Nullable;
import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Predicate;
import org.apache.avro.reflect.AvroIgnore;
import org.apache.avro.reflect.Nullable;
import org.jetbrains.annotations.NotNull;

/**
* Filter structure for fields that should be ignored during AVRO schema generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
import io.goodforgod.dummymapper.model.AnnotationMarker;
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import io.goodforgod.dummymapper.util.MarkerUtils;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.function.Predicate;
import org.jetbrains.annotations.NotNull;

/**
* Allow recursion filter for all {@link RawMarker} or {@link CollectionMarker} with such raw markers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
import io.goodforgod.dummymapper.marker.MapMarker;
import io.goodforgod.dummymapper.marker.Marker;
import io.goodforgod.dummymapper.marker.RawMarker;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import org.jetbrains.annotations.NotNull;

/**
* Filters out empty {@link RawMarker} or if any {@link CollectionMarker} or {@link MapMarker} have empty {@link RawMarker}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.goodforgod.dummymapper.filter.impl;

import io.goodforgod.dummymapper.model.AnnotationMarker;

import java.util.function.Predicate;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.dummymaker.annotation.complex.GenEnum;
import io.goodforgod.dummymapper.model.AnnotationMarker;

import java.util.function.Predicate;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.jetbrains.annotations.NotNull;

/**
* Add {@link JsonProperty#required()} true if such annotation is not present on field
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
import io.goodforgod.dummymapper.marker.Marker;
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.function.Predicate;
import org.jetbrains.annotations.NotNull;

/**
* Filters out {@link Marker} from structure if any annotations is qualified by {@link #predicate()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

import com.fasterxml.jackson.annotation.*;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import org.apache.avro.reflect.*;

import java.lang.annotation.RetentionPolicy;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.avro.reflect.*;

/**
* Filters all unsupported {@link AnnotationMarker} from {@link io.goodforgod.dummymapper.marker.Marker}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import io.goodforgod.dummymapper.filter.impl.EmptyMarkerFilter;
import io.goodforgod.dummymapper.filter.impl.ExcludeSetterAnnotationFilter;
import io.goodforgod.dummymapper.filter.impl.GenEnumAnnotationFilter;

import java.text.SimpleDateFormat;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.ui.config.IConfig;
import java.util.Optional;
import org.apache.avro.Schema;
import org.apache.avro.reflect.ReflectData;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;

/**
* Maps instance of {@link PsiJavaFile} to apache {@link Schema} AVRO format
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.ui.config.AvroJacksonConfig;
import java.util.Optional;
import org.apache.avro.Schema;
import org.jetbrains.annotations.NotNull;

import java.util.Optional;

/**
* Maps instance of {@link PsiJavaFile} to Jackson {@link AvroSchema} AVRO format
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.ui.config.GraphQLConfig;
import io.leangen.graphql.GraphQLSchemaGenerator;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;

/**
* @author Anton Kurako (GoodforGod)
* @since 13.6.2020
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.service.GenFactoryProvider;
import io.goodforgod.dummymapper.ui.config.JsonArrayConfig;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* Maps instance of {@link PsiJavaFile} to JSON format as example
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.service.GenFactoryProvider;
import io.goodforgod.dummymapper.ui.config.IConfig;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;

/**
* Maps instance of {@link PsiJavaFile} to JSON format as example
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
import io.goodforgod.dummymapper.marker.RawMarker;
import io.goodforgod.dummymapper.service.ClassFactory;
import io.goodforgod.dummymapper.ui.config.JsonSchemaConfig;
import java.util.Optional;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Optional;

/**
* Maps instance of {@link PsiJavaFile} to {@link JsonNode} JSON Schema format
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.goodforgod.dummymapper.marker;

import org.jetbrains.annotations.NotNull;

import java.util.Objects;
import org.jetbrains.annotations.NotNull;

/**
* Array marker for any array typed with {@link Marker}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.goodforgod.dummymapper.marker;

import org.jetbrains.annotations.NotNull;

import java.util.Objects;
import org.jetbrains.annotations.NotNull;

/**
* Marker for {@link java.util.Collection} java type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package io.goodforgod.dummymapper.marker;

import io.dummymaker.util.CollectionUtils;
import java.util.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

/**
* Marker for {@link Enum} java type
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.goodforgod.dummymapper.marker;

import org.jetbrains.annotations.NotNull;

import java.util.Objects;
import org.jetbrains.annotations.NotNull;

/**
* Marker for {@link java.util.Map} java type
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/io/goodforgod/dummymapper/marker/Marker.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import io.dummymaker.util.CollectionUtils;
import io.dummymaker.util.StringUtils;
import io.goodforgod.dummymapper.model.AnnotationMarker;
import java.util.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

/**
* Marker that contains information about class information
*
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/io/goodforgod/dummymapper/marker/RawMarker.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package io.goodforgod.dummymapper.marker;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collections;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* Marker for unknown Java type (custom class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package io.goodforgod.dummymapper.marker;

import org.jetbrains.annotations.NotNull;

import java.util.Objects;
import org.jetbrains.annotations.NotNull;

/**
* Marker for known Java type (like {@link Integer}, {@link java.util.Date}, etc)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package io.goodforgod.dummymapper.model;

import org.jetbrains.annotations.NotNull;

import java.util.Map;
import java.util.Objects;
import org.jetbrains.annotations.NotNull;

/**
* Annotation marker
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package io.goodforgod.dummymapper.model;

import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import org.jetbrains.annotations.NotNull;

/**
* Builder for {@link AnnotationMarker}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.goodforgod.dummymapper.scanner.impl;

import static io.goodforgod.dummymapper.util.PsiClassUtils.*;

import com.intellij.lang.jvm.JvmClassKind;
import com.intellij.lang.jvm.annotation.JvmAnnotationArrayValue;
import com.intellij.lang.jvm.annotation.JvmAnnotationAttributeValue;
Expand All @@ -17,15 +19,12 @@
import io.goodforgod.dummymapper.model.AnnotationMarker;
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import io.goodforgod.dummymapper.scanner.IFileScanner;
import org.apache.commons.lang3.ArrayUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static io.goodforgod.dummymapper.util.PsiClassUtils.*;
import org.apache.commons.lang3.ArrayUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
* Scan PsiJavaFile structure of fields and their annotations (also getters and setters annotations for such fields)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import io.goodforgod.dummymapper.scanner.impl.PsiJavaFileScanner;
import io.goodforgod.dummymapper.util.MarkerUtils;
import java.util.*;
import java.util.function.Predicate;
import javassist.*;
import javassist.bytecode.AnnotationsAttribute;
import javassist.bytecode.ConstPool;
Expand All @@ -17,9 +19,6 @@
import javassist.bytecode.annotation.*;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.function.Predicate;

/**
* Class factory that creates Java Class from recreated java class map
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
import io.goodforgod.dummymapper.model.AnnotationMarkerBuilder;
import io.goodforgod.dummymapper.scanner.impl.PsiJavaFileScanner;
import io.goodforgod.dummymapper.util.MarkerUtils;
import org.jetbrains.annotations.NotNull;

import java.util.*;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import org.jetbrains.annotations.NotNull;

/**
* GenFactory Provider that builds GenFactory with special generators for ENUM or other complex values
Expand Down
Loading

0 comments on commit 1f08f29

Please sign in to comment.