private IntersectionTypeBinding18(IntersectionTypeBinding18 prototype) { this.intersectingTypes = prototype.intersectingTypes; this.length = prototype.length; if (!this.intersectingTypes[0].isClass()) { this.javaLangObject = prototype.javaLangObject; this.modifiers |= ClassFileConstants.AccInterface; } }
private IntersectionTypeBinding18(IntersectionTypeBinding18 prototype) { this.intersectingTypes = prototype.intersectingTypes; this.length = prototype.length; if (!this.intersectingTypes[0].isClass()) { this.javaLangObject = prototype.javaLangObject; this.modifiers |= ClassFileConstants.AccInterface; } }
final String qualifiedNameOfParent = new String(referenceBinding.readableName()); final CtType parentOfField = referenceBinding.isClass() ? classFactory.create(qualifiedNameOfParent) : interfaceFactory.create(qualifiedNameOfParent);
public ReferenceBinding [] superInterfaces() { if (this.intersectingTypes[0].isClass()) { ReferenceBinding [] superInterfaces = new ReferenceBinding[this.length - 1]; System.arraycopy(this.intersectingTypes, 1, superInterfaces, 0, this.length - 1); return superInterfaces; } return this.intersectingTypes; }
@Override public ReferenceBinding [] superInterfaces() { if (this.intersectingTypes[0].isClass()) { ReferenceBinding [] superInterfaces = new ReferenceBinding[this.length - 1]; System.arraycopy(this.intersectingTypes, 1, superInterfaces, 0, this.length - 1); return superInterfaces; } return this.intersectingTypes; }
public ReferenceBinding [] superInterfaces() { if (this.intersectingTypes[0].isClass()) { ReferenceBinding [] superInterfaces = new ReferenceBinding[this.length - 1]; System.arraycopy(this.intersectingTypes, 1, superInterfaces, 0, this.length - 1); return superInterfaces; } return this.intersectingTypes; }
public ReferenceBinding [] superInterfaces() { if (this.intersectingTypes[0].isClass()) { ReferenceBinding [] superInterfaces = new ReferenceBinding[this.length - 1]; System.arraycopy(this.intersectingTypes, 1, superInterfaces, 0, this.length - 1); return superInterfaces; } return this.intersectingTypes; }
public IntersectionTypeBinding18(ReferenceBinding[] intersectingTypes, LookupEnvironment environment) { this.intersectingTypes = intersectingTypes; this.length = intersectingTypes.length; if (!intersectingTypes[0].isClass()) { this.javaLangObject = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null); this.modifiers |= ClassFileConstants.AccInterface; } }
public TypeBinding createIntersectionType18(ReferenceBinding[] intersectingTypes) { if (!intersectingTypes[0].isClass()) { Arrays.sort(intersectingTypes, new Comparator<TypeBinding>() { @Override public int compare(TypeBinding o1, TypeBinding o2) { // return o1.isClass() ? -1 : (o2.isClass() ? 1 : CharOperation.compareTo(o1.readableName(), o2.readableName())); } }); } return this.typeSystem.getIntersectionType18(intersectingTypes); }
public TypeBinding createIntersectionType18(ReferenceBinding[] intersectingTypes) { if (!intersectingTypes[0].isClass()) { Arrays.sort(intersectingTypes, new Comparator<TypeBinding>() { @Override public int compare(TypeBinding o1, TypeBinding o2) { // return o1.isClass() ? -1 : (o2.isClass() ? 1 : 0); } }); } return this.typeSystem.getIntersectionType18(intersectingTypes); }
public IntersectionTypeBinding18(ReferenceBinding[] intersectingTypes, LookupEnvironment environment) { this.intersectingTypes = intersectingTypes; this.length = intersectingTypes.length; if (!intersectingTypes[0].isClass()) { this.javaLangObject = environment.getResolvedJavaBaseType(TypeConstants.JAVA_LANG_OBJECT, null); this.modifiers |= ClassFileConstants.AccInterface; } }
public IntersectionTypeBinding18(ReferenceBinding[] intersectingTypes, LookupEnvironment environment) { this.intersectingTypes = intersectingTypes; this.length = intersectingTypes.length; if (!intersectingTypes[0].isClass()) { this.javaLangObject = environment.getResolvedType(TypeConstants.JAVA_LANG_OBJECT, null); this.modifiers |= ClassFileConstants.AccInterface; } }
boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) { if (areReturnTypesCompatible(method, otherMethod)) return true; if (!this.type.isInterface()) if (method.declaringClass.isClass() || !this.type.implementsInterface(method.declaringClass, false)) if (otherMethod.declaringClass.isClass() || !this.type.implementsInterface(otherMethod.declaringClass, false)) return true; // do not complain since the superclass already got blamed return false; }
boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) { if (areReturnTypesCompatible(method, otherMethod)) return true; if (!this.type.isInterface()) if (method.declaringClass.isClass() || !this.type.implementsInterface(method.declaringClass, false)) if (otherMethod.declaringClass.isClass() || !this.type.implementsInterface(otherMethod.declaringClass, false)) return true; // do not complain since the superclass already got blamed return false; }
boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) { if (areReturnTypesCompatible(method, otherMethod)) return true; if (!this.type.isInterface()) if (method.declaringClass.isClass() || !this.type.implementsInterface(method.declaringClass, false)) if (otherMethod.declaringClass.isClass() || !this.type.implementsInterface(otherMethod.declaringClass, false)) return true; // do not complain since the superclass already got blamed return false; }
boolean checkInheritedReturnTypes(MethodBinding method, MethodBinding otherMethod) { if (areReturnTypesCompatible(method, otherMethod)) return true; if (!this.type.isInterface()) if (method.declaringClass.isClass() || !this.type.implementsInterface(method.declaringClass, false)) if (otherMethod.declaringClass.isClass() || !this.type.implementsInterface(otherMethod.declaringClass, false)) return true; // do not complain since the superclass already got blamed return false; }
MethodBinding findReplacedMethod(MethodBinding specific, MethodBinding general) { MethodBinding generalSubstitute = computeSubstituteMethod(general, specific); if (generalSubstitute != null && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general' && isSubstituteParameterSubsignature(specific, generalSubstitute)) { return generalSubstitute; } return null; } void checkTypeVariableMethods(TypeParameter typeParameter) {
MethodBinding findReplacedMethod(MethodBinding specific, MethodBinding general) { MethodBinding generalSubstitute = computeSubstituteMethod(general, specific); if (generalSubstitute != null && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general' && isSubstituteParameterSubsignature(specific, generalSubstitute)) { return generalSubstitute; } return null; } void checkTypeVariableMethods(TypeParameter typeParameter) {
MethodBinding findReplacedMethod(MethodBinding specific, MethodBinding general) { MethodBinding generalSubstitute = computeSubstituteMethod(general, specific); if (generalSubstitute != null && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general' && isSubstituteParameterSubsignature(specific, generalSubstitute)) { return generalSubstitute; } return null; } void checkTypeVariableMethods(TypeParameter typeParameter) {
MethodBinding findReplacedMethod(MethodBinding specific, MethodBinding general) { MethodBinding generalSubstitute = computeSubstituteMethod(general, specific); if (generalSubstitute != null && (!specific.isAbstract() || general.isAbstract() || (general.isDefaultMethod() && specific.declaringClass.isClass())) // if (abstract(specific) => abstract(general)) check if 'specific' overrides 'general' && isSubstituteParameterSubsignature(specific, generalSubstitute)) { return generalSubstitute; } return null; } void checkTypeVariableMethods(TypeParameter typeParameter) {