public abstract class JavaEvaluator
extends java.lang.Object
| Constructor and Description |
|---|
JavaEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areSignaturesEqual(com.intellij.psi.PsiMethod method1,
com.intellij.psi.PsiMethod method2) |
static com.intellij.psi.PsiType |
erasure(com.intellij.psi.PsiType type) |
abstract boolean |
extendsClass(com.intellij.psi.PsiClass cls,
java.lang.String className,
boolean strict) |
abstract com.intellij.psi.PsiAnnotation |
findAnnotation(com.intellij.psi.PsiModifierListOwner listOwner,
java.lang.String... annotationNames) |
abstract com.intellij.psi.PsiAnnotation |
findAnnotationInHierarchy(com.intellij.psi.PsiModifierListOwner listOwner,
java.lang.String... annotationNames) |
abstract com.intellij.psi.PsiClass |
findClass(java.lang.String qualifiedName) |
abstract java.lang.String |
findJarPath(com.intellij.psi.PsiElement element)
Try to determine the path to the .jar file containing the element, if applicable
|
abstract com.intellij.psi.PsiAnnotation[] |
getAllAnnotations(com.intellij.psi.PsiModifierListOwner owner,
boolean inHierarchy) |
abstract com.intellij.psi.PsiClassType |
getClassType(com.intellij.psi.PsiClass psiClass) |
java.lang.String |
getInternalDescription(com.intellij.psi.PsiMethod method,
boolean includeName,
boolean includeReturn)
Computes the internal JVM description of the given method.
|
java.lang.String |
getInternalName(com.intellij.psi.PsiClass psiClass) |
java.lang.String |
getInternalName(com.intellij.psi.PsiClassType psiClassType) |
abstract com.intellij.psi.PsiPackage |
getPackage(com.intellij.psi.PsiElement node) |
int |
getParameterCount(com.intellij.psi.PsiMethod method) |
static java.lang.String |
getPrimitiveSignature(java.lang.String typeName) |
com.intellij.psi.PsiMethod |
getSuperMethod(com.intellij.psi.PsiMethod method) |
abstract boolean |
implementsInterface(com.intellij.psi.PsiClass cls,
java.lang.String interfaceName,
boolean strict) |
boolean |
inheritsFrom(com.intellij.psi.PsiClass cls,
java.lang.String className,
boolean strict)
Checks whether the class extends a super class or implements a given interface.
|
boolean |
isAbstract(com.intellij.psi.PsiModifierListOwner owner) |
boolean |
isFinal(com.intellij.psi.PsiModifierListOwner owner) |
boolean |
isInherited(com.intellij.psi.PsiAnnotation annotation,
com.intellij.psi.PsiModifierListOwner owner)
Returns true if the given annotation is inherited (instead of being defined directly
on the given modifier list holder
|
boolean |
isMemberInClass(com.intellij.psi.PsiMember method,
java.lang.String className) |
boolean |
isMemberInSubClassOf(com.intellij.psi.PsiMember method,
java.lang.String className,
boolean strict) |
boolean |
isPrivate(com.intellij.psi.PsiModifierListOwner owner) |
boolean |
isPublic(com.intellij.psi.PsiModifierListOwner owner) |
boolean |
isStatic(com.intellij.psi.PsiModifierListOwner owner) |
boolean |
methodMatches(com.intellij.psi.PsiMethod method,
java.lang.String className,
boolean allowInherit,
java.lang.String... argumentTypes)
Returns true if the given method (which is typically looked up by resolving a method call) is
either a method in the exact given class, or if
allowInherit is true, a method in a
class possibly extending the given class, and if the parameter types are the exact types
specified. |
boolean |
parameterHasType(com.intellij.psi.PsiMethod method,
int parameterIndex,
java.lang.String typeName)
Returns true if the given type matches the given fully qualified type name
|
boolean |
parametersMatch(com.intellij.psi.PsiMethod method,
java.lang.String... argumentTypes)
Returns true if the given method's parameters are the exact types specified.
|
com.intellij.psi.PsiElement |
resolve(com.intellij.psi.PsiElement element) |
boolean |
typeMatches(com.intellij.psi.PsiType type,
java.lang.String typeName)
Returns true if the given type matches the given fully qualified type name
|
public abstract boolean extendsClass(@Nullable
com.intellij.psi.PsiClass cls,
@NonNull
java.lang.String className,
boolean strict)
public abstract boolean implementsInterface(@NonNull
com.intellij.psi.PsiClass cls,
@NonNull
java.lang.String interfaceName,
boolean strict)
public boolean isMemberInSubClassOf(@NonNull
com.intellij.psi.PsiMember method,
@NonNull
java.lang.String className,
boolean strict)
public boolean isMemberInClass(@Nullable
com.intellij.psi.PsiMember method,
@NonNull
java.lang.String className)
public int getParameterCount(@NonNull
com.intellij.psi.PsiMethod method)
public boolean inheritsFrom(@NonNull
com.intellij.psi.PsiClass cls,
@NonNull
java.lang.String className,
boolean strict)
extendsClass(PsiClass, String, boolean) and implementsInterface(PsiClass, String, boolean).public boolean methodMatches(@NonNull
com.intellij.psi.PsiMethod method,
@Nullable
java.lang.String className,
boolean allowInherit,
@NonNull
java.lang.String... argumentTypes)
allowInherit is true, a method in a
class possibly extending the given class, and if the parameter types are the exact types
specified.method - the method in questionclassName - the class name the method should be defined in or inherit from (or
if null, allow any class)allowInherit - whether we allow checking for inheritanceargumentTypes - the names of the types of the parameterspublic boolean parametersMatch(@NonNull
com.intellij.psi.PsiMethod method,
@NonNull
java.lang.String... argumentTypes)
method - the method in questionargumentTypes - the names of the types of the parameterspublic boolean parameterHasType(@Nullable
com.intellij.psi.PsiMethod method,
int parameterIndex,
@NonNull
java.lang.String typeName)
public boolean typeMatches(@Nullable
com.intellij.psi.PsiType type,
@NonNull
java.lang.String typeName)
@Nullable
public com.intellij.psi.PsiElement resolve(@NonNull
com.intellij.psi.PsiElement element)
public boolean isPublic(@Nullable
com.intellij.psi.PsiModifierListOwner owner)
public boolean isStatic(@Nullable
com.intellij.psi.PsiModifierListOwner owner)
public boolean isPrivate(@Nullable
com.intellij.psi.PsiModifierListOwner owner)
public boolean isAbstract(@Nullable
com.intellij.psi.PsiModifierListOwner owner)
public boolean isFinal(@Nullable
com.intellij.psi.PsiModifierListOwner owner)
@Nullable
public com.intellij.psi.PsiMethod getSuperMethod(@Nullable
com.intellij.psi.PsiMethod method)
@Nullable
public java.lang.String getInternalName(@NonNull
com.intellij.psi.PsiClass psiClass)
@Nullable
public java.lang.String getInternalName(@NonNull
com.intellij.psi.PsiClassType psiClassType)
@Nullable
public java.lang.String getInternalDescription(@NonNull
com.intellij.psi.PsiMethod method,
boolean includeName,
boolean includeReturn)
foo(ILjava/lang/String;):V.method - the method to look up the description forincludeName - whether the name should be includedincludeReturn - whether the return type should be includedpublic boolean areSignaturesEqual(@NonNull
com.intellij.psi.PsiMethod method1,
@NonNull
com.intellij.psi.PsiMethod method2)
@Nullable
public static com.intellij.psi.PsiType erasure(@Nullable
com.intellij.psi.PsiType type)
@Nullable public static java.lang.String getPrimitiveSignature(java.lang.String typeName)
@Nullable
public abstract com.intellij.psi.PsiClass findClass(@NonNull
java.lang.String qualifiedName)
@Nullable
public abstract com.intellij.psi.PsiClassType getClassType(@Nullable
com.intellij.psi.PsiClass psiClass)
@NonNull
public abstract com.intellij.psi.PsiAnnotation[] getAllAnnotations(@NonNull
com.intellij.psi.PsiModifierListOwner owner,
boolean inHierarchy)
@Nullable
public abstract com.intellij.psi.PsiAnnotation findAnnotationInHierarchy(@NonNull
com.intellij.psi.PsiModifierListOwner listOwner,
@NonNull
java.lang.String... annotationNames)
@Nullable
public abstract com.intellij.psi.PsiAnnotation findAnnotation(@Nullable
com.intellij.psi.PsiModifierListOwner listOwner,
@NonNull
java.lang.String... annotationNames)
@Nullable
public abstract java.lang.String findJarPath(@NonNull
com.intellij.psi.PsiElement element)
public boolean isInherited(@NonNull
com.intellij.psi.PsiAnnotation annotation,
@NonNull
com.intellij.psi.PsiModifierListOwner owner)
annotation - the annotation to checkowner - the owner potentially declaring the annotation@Nullable
public abstract com.intellij.psi.PsiPackage getPackage(@NonNull
com.intellij.psi.PsiElement node)