public class CaptureBinding18 extends CaptureBinding
Capture-like type variable introduced during 1.8 type inference.
  • Constructor Details

    • CaptureBinding18

      public CaptureBinding18(ReferenceBinding contextType, char[] sourceName, char[] originalName, int start, int end, int captureID, LookupEnvironment environment)
  • Method Details

    • setUpperBounds

      public boolean setUpperBounds(TypeBinding[] upperBounds, ReferenceBinding javaLangObject)
    • initializeBounds

      public void initializeBounds(Scope scope, ParameterizedTypeBinding capturedParameterizedType)
      Description copied from class: CaptureBinding
      Initialize capture bounds using substituted supertypes e.g. given X<U, V extends X<U, V>>, capture(X<E,?>) = X<E,capture>, where capture extends X<E,capture>
      Overrides:
      initializeBounds in class CaptureBinding
    • clone

      public TypeBinding clone(TypeBinding enclosingType)
      Description copied from class: TypeBinding
      Virtual copy constructor: a copy is made of the receiver's entire instance state and then suitably parameterized by the arguments to the clone operation as seen fit by each type. Parameters may not make sense for every type in the hierarchy, in which case they are silently ignored. A type may choose to retain a copy of the prototype for reference.
      Overrides:
      clone in class CaptureBinding
    • getMethods

      public MethodBinding[] getMethods(char[] selector)
      Overrides:
      getMethods in class ReferenceBinding
    • erasure

      public TypeBinding erasure()
      Overrides:
      erasure in class TypeVariableBinding
    • isEquivalentTo

      public boolean isEquivalentTo(TypeBinding otherType)
      Description copied from class: TypeBinding
      Returns true if a type is identical to another one, or for generic types, true if compared to its raw type.
      Overrides:
      isEquivalentTo in class CaptureBinding
      See Also:
    • isCompatibleWith

      public boolean isCompatibleWith(TypeBinding otherType, Scope captureScope)
      Description copied from class: ReferenceBinding
      Answer true if the receiver type can be assigned to the argument type (right) In addition to improving performance, caching also ensures there is no infinite regression since per nature, the compatibility check is recursive through parameterized type arguments (122775)
      Overrides:
      isCompatibleWith in class ReferenceBinding
    • findSuperTypeOriginatingFrom

      public TypeBinding findSuperTypeOriginatingFrom(TypeBinding otherType)
      Description copied from class: TypeBinding
      Find supertype which originates from a given type, or null if not found
      Overrides:
      findSuperTypeOriginatingFrom in class TypeBinding
    • isProperType

      public boolean isProperType(boolean admitCapture18)
      Description copied from class: TypeBinding
      JLS8 Sect 18.1.1
      Overrides:
      isProperType in class CaptureBinding
      Parameters:
      admitCapture18 - request if CaptureBinding18 shuld be considered as a proper type. If unsure say 'true', only in Scope.greaterLowerBound(TypeBinding[], Scope, LookupEnvironment) CaptureBinding18 has to be excluded to prevent an NPE on a branch that heuristically tries to avoid inconsistent intersections.
    • readableName

      public char[] readableName()
      Description copied from class: ReferenceBinding
      Answer the receiver's signature. NOTE: This method should only be used during/after code gen.
      Overrides:
      readableName in class CaptureBinding
      See Also:
      • invalid reference
        org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#readableName()
    • shortReadableName

      public char[] shortReadableName()
      Overrides:
      shortReadableName in class CaptureBinding
      See Also:
      • invalid reference
        org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding#shortReadableName()
    • uncapture

      public TypeBinding uncapture(Scope scope)
      Description copied from class: TypeBinding
      Perform capture "deconversion" on a given type
      Overrides:
      uncapture in class CaptureBinding
    • computeUniqueKey

      public char[] computeUniqueKey(boolean isLeaf)
      Description copied from class: ReferenceBinding
      p.X<T extends Y & I, U extends Y> -> Lp/X<TT;TU;>;
      Overrides:
      computeUniqueKey in class CaptureBinding