ITypeBinding curr= currNodeBinding; while (curr != null) { if (curr.getKey().equals(targetType.getKey())) { return Modifier.PROTECTED; } curr= curr.getSuperclass();
if (Bindings.findTypeInHierarchy(currNodeBinding, targetType)) { return Modifier.PROTECTED;
	private static int getNeededVisibility(ASTNode currNode, ITypeBinding targetType) {		ITypeBinding currNodeBinding= ASTResolving.getBindingOfParentType(currNode);		if (currNodeBinding == null) { // import			return Modifier.PUBLIC;		}				ITypeBinding curr= currNodeBinding;		while (curr != null) {			if (curr.getKey().equals(targetType.getKey())) {				return Modifier.PROTECTED;			}			curr= curr.getSuperclass();		}		if (currNodeBinding.getPackage().getKey().equals(targetType.getPackage().getKey())) {			return 0;		}		return Modifier.PUBLIC;	}