mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (formatting; warnings)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,6 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.psi.search.GlobalSearchScope;
|
||||
import com.intellij.psi.util.TypeConversionUtil;
|
||||
import com.intellij.util.ArrayFactory;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -27,16 +26,16 @@ import org.jetbrains.annotations.Nullable;
|
||||
* Representation of Java type (primitive type, array or class type).
|
||||
*/
|
||||
public abstract class PsiType implements PsiAnnotationOwner {
|
||||
public static final PsiPrimitiveType BYTE = new PsiPrimitiveType("byte", "java.lang.Byte");
|
||||
public static final PsiPrimitiveType CHAR = new PsiPrimitiveType("char", "java.lang.Character");
|
||||
public static final PsiPrimitiveType DOUBLE = new PsiPrimitiveType("double", "java.lang.Double");
|
||||
public static final PsiPrimitiveType FLOAT = new PsiPrimitiveType("float", "java.lang.Float");
|
||||
public static final PsiPrimitiveType INT = new PsiPrimitiveType("int", "java.lang.Integer");
|
||||
public static final PsiPrimitiveType LONG = new PsiPrimitiveType("long", "java.lang.Long");
|
||||
public static final PsiPrimitiveType SHORT = new PsiPrimitiveType("short", "java.lang.Short");
|
||||
public static final PsiPrimitiveType BOOLEAN = new PsiPrimitiveType("boolean", "java.lang.Boolean");
|
||||
public static final PsiPrimitiveType VOID = new PsiPrimitiveType("void", "java.lang.Void");
|
||||
public static final PsiPrimitiveType NULL = new PsiPrimitiveType("null", (String)null);
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType BYTE = new PsiPrimitiveType("byte", "java.lang.Byte");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType CHAR = new PsiPrimitiveType("char", "java.lang.Character");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType DOUBLE = new PsiPrimitiveType("double", "java.lang.Double");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType FLOAT = new PsiPrimitiveType("float", "java.lang.Float");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType INT = new PsiPrimitiveType("int", "java.lang.Integer");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType LONG = new PsiPrimitiveType("long", "java.lang.Long");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType SHORT = new PsiPrimitiveType("short", "java.lang.Short");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType BOOLEAN = new PsiPrimitiveType("boolean", "java.lang.Boolean");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType VOID = new PsiPrimitiveType("void", "java.lang.Void");
|
||||
@SuppressWarnings("StaticInitializerReferencesSubClass") public static final PsiPrimitiveType NULL = new PsiPrimitiveType("null", (String)null);
|
||||
|
||||
public static final PsiType[] EMPTY_ARRAY = new PsiType[0];
|
||||
public static final ArrayFactory<PsiType> ARRAY_FACTORY = new ArrayFactory<PsiType>() {
|
||||
@@ -92,14 +91,12 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
/**
|
||||
* Returns text of the type that can be presented to a user (references normally non-qualified).
|
||||
*/
|
||||
@NonNls
|
||||
@NotNull
|
||||
public abstract String getPresentableText();
|
||||
|
||||
/**
|
||||
* Returns canonical representation of the type (all references fully-qualified).
|
||||
*/
|
||||
@NonNls
|
||||
@NotNull
|
||||
public String getCanonicalText(boolean annotated) {
|
||||
return getCanonicalText();
|
||||
@@ -108,7 +105,6 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
/**
|
||||
* Same as {@code getCanonicalText(false)}.
|
||||
*/
|
||||
@NonNls
|
||||
@NotNull
|
||||
public abstract String getCanonicalText();
|
||||
|
||||
@@ -116,7 +112,6 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
* Return canonical text of the type with some internal details added for presentational purposes. Use with care.
|
||||
* todo[r.sh] merge with getPresentableText()
|
||||
*/
|
||||
@NonNls
|
||||
@NotNull
|
||||
public abstract String getInternalCanonicalText();
|
||||
|
||||
@@ -148,7 +143,7 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
* @param text the text to compare with.
|
||||
* @return true if the string is equivalent to the type, false otherwise
|
||||
*/
|
||||
public abstract boolean equalsToText(@NotNull @NonNls String text);
|
||||
public abstract boolean equalsToText(@NotNull String text);
|
||||
|
||||
/**
|
||||
* Returns the class type for qualified class name.
|
||||
@@ -308,7 +303,7 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PsiAnnotation findAnnotation(@NotNull @NonNls String qualifiedName) {
|
||||
public PsiAnnotation findAnnotation(@NotNull String qualifiedName) {
|
||||
for (PsiAnnotation annotation : getAnnotations()) {
|
||||
if (qualifiedName.equals(annotation.getQualifiedName())) {
|
||||
return annotation;
|
||||
@@ -319,7 +314,7 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public PsiAnnotation addAnnotation(@NotNull @NonNls String qualifiedName) {
|
||||
public PsiAnnotation addAnnotation(@NotNull String qualifiedName) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@@ -331,7 +326,6 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
//noinspection HardCodedStringLiteral
|
||||
return "PsiType:" + getPresentableText();
|
||||
}
|
||||
|
||||
@@ -343,7 +337,7 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
super(annotations);
|
||||
}
|
||||
|
||||
public Stub(@NotNull TypeAnnotationProvider annotations) {
|
||||
protected Stub(@NotNull TypeAnnotationProvider annotations) {
|
||||
super(annotations);
|
||||
}
|
||||
|
||||
@@ -357,4 +351,4 @@ public abstract class PsiType implements PsiAnnotationOwner {
|
||||
@Override
|
||||
public abstract String getCanonicalText(boolean annotated);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user