diff options
Diffstat (limited to 'src/main/java/com/squareup/javapoet/TypeName.java')
-rw-r--r-- | src/main/java/com/squareup/javapoet/TypeName.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/squareup/javapoet/TypeName.java b/src/main/java/com/squareup/javapoet/TypeName.java index 401887d..e09d785 100644 --- a/src/main/java/com/squareup/javapoet/TypeName.java +++ b/src/main/java/com/squareup/javapoet/TypeName.java @@ -36,7 +36,7 @@ import javax.lang.model.type.NoType; import javax.lang.model.type.PrimitiveType; import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; -import javax.lang.model.util.SimpleTypeVisitor7; +import javax.lang.model.util.SimpleTypeVisitor8; /** * Any type in Java's type system, plus {@code void}. This class is an identifier for primitive @@ -95,7 +95,7 @@ public class TypeName { private String cachedString; private TypeName(String keyword) { - this(keyword, new ArrayList<AnnotationSpec>()); + this(keyword, new ArrayList<>()); } private TypeName(String keyword, List<AnnotationSpec> annotations) { @@ -235,12 +235,12 @@ public class TypeName { /** Returns a type name equivalent to {@code mirror}. */ public static TypeName get(TypeMirror mirror) { - return get(mirror, new LinkedHashMap<TypeParameterElement, TypeVariableName>()); + return get(mirror, new LinkedHashMap<>()); } static TypeName get(TypeMirror mirror, final Map<TypeParameterElement, TypeVariableName> typeVariables) { - return mirror.accept(new SimpleTypeVisitor7<TypeName, Void>() { + return mirror.accept(new SimpleTypeVisitor8<TypeName, Void>() { @Override public TypeName visitPrimitive(PrimitiveType t, Void p) { switch (t.getKind()) { case BOOLEAN: @@ -315,7 +315,7 @@ public class TypeName { /** Returns a type name equivalent to {@code type}. */ public static TypeName get(Type type) { - return get(type, new LinkedHashMap<Type, TypeVariableName>()); + return get(type, new LinkedHashMap<>()); } static TypeName get(Type type, Map<Type, TypeVariableName> map) { @@ -352,7 +352,7 @@ public class TypeName { /** Converts an array of types to a list of type names. */ static List<TypeName> list(Type[] types) { - return list(types, new LinkedHashMap<Type, TypeVariableName>()); + return list(types, new LinkedHashMap<>()); } static List<TypeName> list(Type[] types, Map<Type, TypeVariableName> map) { |