Class FakeExceptionTypeBinding

java.lang.Object
com.ibm.wala.cast.java.translator.jdt.FakeExceptionTypeBinding
All Implemented Interfaces:
org.eclipse.jdt.core.dom.IBinding, org.eclipse.jdt.core.dom.ITypeBinding

public class FakeExceptionTypeBinding extends Object implements org.eclipse.jdt.core.dom.ITypeBinding
This is a hack to get around the fact that AST.resolveWellKnownTypes() doesn't know about some implicitly declared exceptions, such as ArithmeticException (implicitly thrown in a division operation) and NullPointerException (implicitly thrown in a field access). We need to know the lineage of these types to determine possible catch targets.
Author:
evan
  • Field Details

  • Method Details

    • isAssignmentCompatible

      public boolean isAssignmentCompatible(org.eclipse.jdt.core.dom.ITypeBinding variableType)
      Specified by:
      isAssignmentCompatible in interface org.eclipse.jdt.core.dom.ITypeBinding
    • equals

      public boolean equals(Object o)
      Specified by:
      equals in interface org.eclipse.jdt.core.dom.IBinding
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createArrayType

      public org.eclipse.jdt.core.dom.ITypeBinding createArrayType(int dimension)
      Specified by:
      createArrayType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getBinaryName

      public String getBinaryName()
      Specified by:
      getBinaryName in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getBound

      public org.eclipse.jdt.core.dom.ITypeBinding getBound()
      Specified by:
      getBound in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getComponentType

      public org.eclipse.jdt.core.dom.ITypeBinding getComponentType()
      Specified by:
      getComponentType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaredFields

      public org.eclipse.jdt.core.dom.IVariableBinding[] getDeclaredFields()
      Specified by:
      getDeclaredFields in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaredMethods

      public org.eclipse.jdt.core.dom.IMethodBinding[] getDeclaredMethods()
      Specified by:
      getDeclaredMethods in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaredModifiers

      public int getDeclaredModifiers()
      Specified by:
      getDeclaredModifiers in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaredTypes

      public org.eclipse.jdt.core.dom.ITypeBinding[] getDeclaredTypes()
      Specified by:
      getDeclaredTypes in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaringClass

      public org.eclipse.jdt.core.dom.ITypeBinding getDeclaringClass()
      Specified by:
      getDeclaringClass in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaringMethod

      public org.eclipse.jdt.core.dom.IMethodBinding getDeclaringMethod()
      Specified by:
      getDeclaringMethod in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDimensions

      public int getDimensions()
      Specified by:
      getDimensions in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getElementType

      public org.eclipse.jdt.core.dom.ITypeBinding getElementType()
      Specified by:
      getElementType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getErasure

      public org.eclipse.jdt.core.dom.ITypeBinding getErasure()
      Specified by:
      getErasure in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getInterfaces

      public org.eclipse.jdt.core.dom.ITypeBinding[] getInterfaces()
      Specified by:
      getInterfaces in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getModifiers

      public int getModifiers()
      Specified by:
      getModifiers in interface org.eclipse.jdt.core.dom.IBinding
      Specified by:
      getModifiers in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getName

      public String getName()
      Specified by:
      getName in interface org.eclipse.jdt.core.dom.IBinding
      Specified by:
      getName in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getPackage

      public org.eclipse.jdt.core.dom.IPackageBinding getPackage()
      Specified by:
      getPackage in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getQualifiedName

      public String getQualifiedName()
      Specified by:
      getQualifiedName in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getSuperclass

      public org.eclipse.jdt.core.dom.ITypeBinding getSuperclass()
      Specified by:
      getSuperclass in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getTypeArguments

      public org.eclipse.jdt.core.dom.ITypeBinding[] getTypeArguments()
      Specified by:
      getTypeArguments in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getTypeBounds

      public org.eclipse.jdt.core.dom.ITypeBinding[] getTypeBounds()
      Specified by:
      getTypeBounds in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getTypeDeclaration

      public org.eclipse.jdt.core.dom.ITypeBinding getTypeDeclaration()
      Specified by:
      getTypeDeclaration in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getTypeParameters

      public org.eclipse.jdt.core.dom.ITypeBinding[] getTypeParameters()
      Specified by:
      getTypeParameters in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getWildcard

      public org.eclipse.jdt.core.dom.ITypeBinding getWildcard()
      Specified by:
      getWildcard in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isAnnotation

      public boolean isAnnotation()
      Specified by:
      isAnnotation in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isAnonymous

      public boolean isAnonymous()
      Specified by:
      isAnonymous in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isArray

      public boolean isArray()
      Specified by:
      isArray in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isCapture

      public boolean isCapture()
      Specified by:
      isCapture in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isCastCompatible

      public boolean isCastCompatible(org.eclipse.jdt.core.dom.ITypeBinding type)
      Specified by:
      isCastCompatible in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isClass

      public boolean isClass()
      Specified by:
      isClass in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isEnum

      public boolean isEnum()
      Specified by:
      isEnum in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isRecord

      public boolean isRecord()
      This overrides a method introduced in recent versions of the ITypeBinding interface to handle records. We omit the @Override annotation to allow building against earlier versions of org.eclipse.jdt.core, where ITypeBinding does not contain this method.
      Specified by:
      isRecord in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isFromSource

      public boolean isFromSource()
      Specified by:
      isFromSource in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isGenericType

      public boolean isGenericType()
      Specified by:
      isGenericType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isInterface

      public boolean isInterface()
      Specified by:
      isInterface in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isIntersectionType

      public boolean isIntersectionType()
      Specified by:
      isIntersectionType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isLocal

      public boolean isLocal()
      Specified by:
      isLocal in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isMember

      public boolean isMember()
      Specified by:
      isMember in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isNested

      public boolean isNested()
      Specified by:
      isNested in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isNullType

      public boolean isNullType()
      Specified by:
      isNullType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isParameterizedType

      public boolean isParameterizedType()
      Specified by:
      isParameterizedType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isPrimitive

      public boolean isPrimitive()
      Specified by:
      isPrimitive in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isRawType

      public boolean isRawType()
      Specified by:
      isRawType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isSubTypeCompatible

      public boolean isSubTypeCompatible(org.eclipse.jdt.core.dom.ITypeBinding type)
      Specified by:
      isSubTypeCompatible in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isTopLevel

      public boolean isTopLevel()
      Specified by:
      isTopLevel in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isTypeVariable

      public boolean isTypeVariable()
      Specified by:
      isTypeVariable in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isUpperbound

      public boolean isUpperbound()
      Specified by:
      isUpperbound in interface org.eclipse.jdt.core.dom.ITypeBinding
    • isWildcardType

      public boolean isWildcardType()
      Specified by:
      isWildcardType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getAnnotations

      public org.eclipse.jdt.core.dom.IAnnotationBinding[] getAnnotations()
      Specified by:
      getAnnotations in interface org.eclipse.jdt.core.dom.IBinding
    • getJavaElement

      public org.eclipse.jdt.core.IJavaElement getJavaElement()
      Specified by:
      getJavaElement in interface org.eclipse.jdt.core.dom.IBinding
    • getKey

      public String getKey()
      Specified by:
      getKey in interface org.eclipse.jdt.core.dom.IBinding
    • getKind

      public int getKind()
      Specified by:
      getKind in interface org.eclipse.jdt.core.dom.IBinding
    • isDeprecated

      public boolean isDeprecated()
      Specified by:
      isDeprecated in interface org.eclipse.jdt.core.dom.IBinding
    • isEqualTo

      public boolean isEqualTo(org.eclipse.jdt.core.dom.IBinding binding)
      Specified by:
      isEqualTo in interface org.eclipse.jdt.core.dom.IBinding
    • isRecovered

      public boolean isRecovered()
      Specified by:
      isRecovered in interface org.eclipse.jdt.core.dom.IBinding
    • isSynthetic

      public boolean isSynthetic()
      Specified by:
      isSynthetic in interface org.eclipse.jdt.core.dom.IBinding
    • getGenericTypeOfWildcardType

      public org.eclipse.jdt.core.dom.ITypeBinding getGenericTypeOfWildcardType()
      Specified by:
      getGenericTypeOfWildcardType in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getRank

      public int getRank()
      Specified by:
      getRank in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getFunctionalInterfaceMethod

      public org.eclipse.jdt.core.dom.IMethodBinding getFunctionalInterfaceMethod()
      Specified by:
      getFunctionalInterfaceMethod in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getTypeAnnotations

      public org.eclipse.jdt.core.dom.IAnnotationBinding[] getTypeAnnotations()
      Specified by:
      getTypeAnnotations in interface org.eclipse.jdt.core.dom.ITypeBinding
    • getDeclaringMember

      public org.eclipse.jdt.core.dom.IBinding getDeclaringMember()
      Specified by:
      getDeclaringMember in interface org.eclipse.jdt.core.dom.ITypeBinding