@Override protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) throws InvalidInputException { if (replaceWildcards) { TypeBinding[] types = getNonWildcardParameterization(scope); if (types == null) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; for (int i = 0; i < types.length; i++) { if (TypeBinding.notEquals(types[i], this.arguments[i])) { // non-wildcard parameterization differs from this, so use it: ParameterizedTypeBinding declaringType = scope.environment().createParameterizedType(this.type, types, this.type.enclosingType()); TypeVariableBinding [] typeParameters = this.type.typeVariables(); for (int j = 0, length = typeParameters.length; j < length; j++) { if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS()) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; } return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards); } } } return super.getInterfaceAbstractContracts(scope, replaceWildcards); } public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards) {
@Override protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) throws InvalidInputException { if (replaceWildcards) { TypeBinding[] types = getNonWildcardParameterization(scope); if (types == null) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; for (int i = 0; i < types.length; i++) { if (TypeBinding.notEquals(types[i], this.arguments[i])) { // non-wildcard parameterization differs from this, so use it: ParameterizedTypeBinding declaringType = scope.environment().createParameterizedType(this.type, types, this.type.enclosingType()); TypeVariableBinding [] typeParameters = this.type.typeVariables(); for (int j = 0, length = typeParameters.length; j < length; j++) { if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS()) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; } return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards); } } } return super.getInterfaceAbstractContracts(scope, replaceWildcards); } public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards) {
@Override protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards) throws InvalidInputException { if (replaceWildcards) { TypeBinding[] types = getNonWildcardParameterization(scope); if (types == null) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; for (int i = 0; i < types.length; i++) { if (TypeBinding.notEquals(types[i], this.arguments[i])) { // non-wildcard parameterization differs from this, so use it: ParameterizedTypeBinding declaringType = scope.environment().createParameterizedType(this.type, types, this.type.enclosingType()); TypeVariableBinding [] typeParameters = this.type.typeVariables(); for (int j = 0, length = typeParameters.length; j < length; j++) { if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS()) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; } return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards); } } } return super.getInterfaceAbstractContracts(scope, replaceWildcards); } public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards) {
@Override protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards, boolean filterDefaultMethods) throws InvalidInputException { if (replaceWildcards) { TypeBinding[] types = getNonWildcardParameterization(scope); if (types == null) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; for (int i = 0; i < types.length; i++) { if (TypeBinding.notEquals(types[i], this.arguments[i])) { // non-wildcard parameterization differs from this, so use it: ParameterizedTypeBinding declaringType = scope.environment().createParameterizedType(this.type, types, this.type.enclosingType()); TypeVariableBinding [] typeParameters = this.type.typeVariables(); for (int j = 0, length = typeParameters.length; j < length; j++) { if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS()) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; } return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards, filterDefaultMethods); } } } return super.getInterfaceAbstractContracts(scope, replaceWildcards, filterDefaultMethods); } @Override
@Override protected MethodBinding[] getInterfaceAbstractContracts(Scope scope, boolean replaceWildcards, boolean filterDefaultMethods) throws InvalidInputException { if (replaceWildcards) { TypeBinding[] types = getNonWildcardParameterization(scope); if (types == null) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; for (int i = 0; i < types.length; i++) { if (TypeBinding.notEquals(types[i], this.arguments[i])) { // non-wildcard parameterization differs from this, so use it: ParameterizedTypeBinding declaringType = scope.environment().createParameterizedType(this.type, types, this.type.enclosingType()); TypeVariableBinding [] typeParameters = this.type.typeVariables(); for (int j = 0, length = typeParameters.length; j < length; j++) { if (!typeParameters[j].boundCheck(declaringType, types[j], scope, null).isOKbyJLS()) return new MethodBinding[] { new ProblemMethodBinding(TypeConstants.ANONYMOUS_METHOD, null, ProblemReasons.NotAWellFormedParameterizedType) }; } return declaringType.getInterfaceAbstractContracts(scope, replaceWildcards, filterDefaultMethods); } } } return super.getInterfaceAbstractContracts(scope, replaceWildcards, filterDefaultMethods); } public MethodBinding getSingleAbstractMethod(final Scope scope, boolean replaceWildcards) {