@Override public boolean isSynthetic() { return originalBinding.isSynthetic(); }
/** * Returns true iff the selected constructor can be protected. * @return return <code>true</code> if the constructor can be made protected */ public boolean canProtectConstructor() { return !fCtorBinding.isSynthetic() && fFactoryCU.findDeclaringNode(fCtorBinding.getKey()) != null; }
/** * Returns true iff the selected constructor can be protected. * @return return <code>true</code> if the constructor can be made protected */ public boolean canProtectConstructor() { return !fCtorBinding.isSynthetic() && fFactoryCU.findDeclaringNode(fCtorBinding.getKey()) != null; }
/** * Returns true iff the selected constructor can be protected. */ public boolean canProtectConstructor() { return !fCtorBinding.isSynthetic() && fFactoryCU.findDeclaringNode(fCtorBinding.getKey()) != null; }
/** * Returns the functional interface method being implemented by the given method * reference. * * @param methodReference * the method reference to get the functional method * @return the functional interface method being implemented by * <code>methodReference</code> or <code>null</code> if it could not be * derived */ public static IMethodBinding getFunctionalMethodForMethodReference(MethodReference methodReference) { ITypeBinding targetTypeBinding = ASTNodes.getTargetType(methodReference); if (targetTypeBinding == null) { return null; } IMethodBinding functionalMethod = targetTypeBinding.getFunctionalInterfaceMethod(); if (functionalMethod.isSynthetic()) { functionalMethod = Bindings.findOverriddenMethodInType(functionalMethod.getDeclaringClass(), functionalMethod); } return functionalMethod; }
/** * Returns the functional interface method being implemented by the given method reference. * * @param methodReference the method reference to get the functional method * @return the functional interface method being implemented by <code>methodReference</code> or * <code>null</code> if it could not be derived */ public static IMethodBinding getFunctionalMethodForMethodReference(MethodReference methodReference) { ITypeBinding targetTypeBinding= ASTNodes.getTargetType(methodReference); if (targetTypeBinding == null) return null; IMethodBinding functionalMethod= targetTypeBinding.getFunctionalInterfaceMethod(); if (functionalMethod.isSynthetic()) { functionalMethod= Bindings.findOverriddenMethodInType(functionalMethod.getDeclaringClass(), functionalMethod); } return functionalMethod; }
/** * Returns the functional interface method being implemented by the given method reference. * * @param methodReference the method reference to get the functional method * @return the functional interface method being implemented by <code>methodReference</code> or * <code>null</code> if it could not be derived */ public static IMethodBinding getFunctionalMethodForMethodReference(MethodReference methodReference) { ITypeBinding targetTypeBinding= ASTNodes.getTargetType(methodReference); if (targetTypeBinding == null) return null; IMethodBinding functionalMethod= targetTypeBinding.getFunctionalInterfaceMethod(); if (functionalMethod.isSynthetic()) { functionalMethod= Bindings.findOverriddenMethodInType(functionalMethod.getDeclaringClass(), functionalMethod); } return functionalMethod; }
for (int i= 0; i < methodBindings.length; i++) { IMethodBinding curr= methodBindings[i]; if (!curr.isSynthetic() && !curr.isConstructor()) { if (requestor.acceptBinding(curr)) return true;
continue; if (!curr.isSynthetic() && !curr.isConstructor()) { if (requestor.acceptBinding(curr)) return true;
continue; if (!curr.isSynthetic() && !curr.isConstructor()) { if (requestor.acceptBinding(curr)) return true;
private void importStaticTypesAndMembersFromType(ImportDeclaration node) { final IBinding binding = node.resolveBinding(); if (binding == null) { return; } if (binding.getKind() != TYPE) { throw new NotImplementedException(node, "for a binding of kind " + binding.getKind()); } final ITypeBinding typeBinding = (ITypeBinding) binding; final String typeName = typeBinding.getQualifiedName(); for (IMethodBinding method : typeBinding.getDeclaredMethods()) { if (canAdd(method.getModifiers(), method.isSynthetic())) { QName qname = QName.valueOf(typeName, method.getName()); methods.addName(FQN.fromImport(qname, true)); } } for (IVariableBinding field : typeBinding.getDeclaredFields()) { if (canAdd(field.getModifiers(), field.isSynthetic())) { QName qname = QName.valueOf(typeName, field.getName()); fields.addName(FQN.fromImport(qname, true)); } } for (ITypeBinding memberType : typeBinding.getDeclaredTypes()) { if (canAdd(memberType.getModifiers(), memberType.isSynthetic())) { QName qname = QName.valueOf(memberType.getQualifiedName()); types.addName(FQN.fromImport(qname, true)); } } }