if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
if (inheritedMethodToBridge.isAbstract() || inheritedMethodToBridge.isFinal() || inheritedMethodToBridge.isStatic()) { return null;
method = new JMethod(info, intern(b.selector), enclosingType, typeMap.get(b.returnType), b .isAbstract(), b.isStatic(), b.isFinal(), AccessModifier.fromMethodBinding(b));
private boolean isDirectCodeGenPossible() { if (this.binding != null) { if (isMethodReference() && this.syntheticAccessor == null) { if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) { // reference to a method declared by an inaccessible type accessed via a // subtype - normally a bridge method would be present to facilitate // this access, unless the method is final, in which case, direct access to // the method is not possible, an implicit lambda is needed if (!this.binding.declaringClass.canBeSeenBy(this.enclosingScope)) { return !this.binding.isFinal(); } } } TypeBinding[] descriptorParams = this.descriptor.parameters; TypeBinding[] origParams = this.binding.original().parameters; TypeBinding[] origDescParams = this.descriptor.original().parameters; int offset = this.receiverPrecedesParameters ? 1 : 0; for (int i = 0; i < descriptorParams.length - offset; i++) { TypeBinding descType = descriptorParams[i + offset]; TypeBinding origDescType = origDescParams[i + offset]; if (descType.isIntersectionType18() || (descType.isTypeVariable() && ((TypeVariableBinding) descType).otherUpperBounds() != null)) { return CharOperation.equals(origDescType.signature(), origParams[i].signature()); } } } return true; } public void generateCode(BlockScope currentScope, CodeStream codeStream, boolean valueRequired) {
private boolean isDirectCodeGenPossible() { if (this.binding != null) { if (isMethodReference() && this.syntheticAccessor == null) { if (TypeBinding.notEquals(this.binding.declaringClass, this.lhs.resolvedType.erasure())) { // reference to a method declared by an inaccessible type accessed via a // subtype - normally a bridge method would be present to facilitate // this access, unless the method is final/static, in which case, direct access to // the method is not possible, an implicit lambda is needed if (!this.binding.declaringClass.canBeSeenBy(this.enclosingScope)) { return !(this.binding.isFinal() || this.binding.isStatic()); } } } TypeBinding[] descriptorParams = this.descriptor.parameters; TypeBinding[] origParams = this.binding.original().parameters; TypeBinding[] origDescParams = this.descriptor.original().parameters; int offset = this.receiverPrecedesParameters ? 1 : 0; for (int i = 0; i < descriptorParams.length - offset; i++) { TypeBinding descType = descriptorParams[i + offset]; TypeBinding origDescType = origDescParams[i + offset]; if (descType.isIntersectionType18() || (descType.isTypeVariable() && ((TypeVariableBinding) descType).boundsCount() > 1)) { return CharOperation.equals(origDescType.signature(), origParams[i].signature()); } } } return true; } @Override
&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough && inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject) if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod)) if (!inheritedMethod.isStatic() && !inheritedMethod.isFinal()) checkForBridgeMethod(currentMethod, inheritedMethod, allInheritedMethods); MethodBinding inheritedMethod = overridden[i]; if (isParameterSubsignature(currentMethod, inheritedMethod) && !inheritedMethod.isStatic() && !inheritedMethod.isFinal()) checkForBridgeMethod(currentMethod, inheritedMethod, allInheritedMethods);
&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough && inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject) if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))
&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough && inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject) if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))
&& !inheritedMethod.isFinal() // overriding final is already reported, that's enough && inheritedMethod.declaringClass.id == TypeIds.T_JavaLangObject) if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))
if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))
if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))
if (inheritedMethod.isFinal()) problemReporter(currentMethod).finalMethodCannotBeOverridden(currentMethod, inheritedMethod); if (!isAsVisible(currentMethod, inheritedMethod))