ASTNode parent= fOriginalNode.getParent(); if (parent instanceof QualifiedName) { IBinding qualifierBinding= ((QualifiedName)parent).getQualifier().resolveBinding(); if (qualifierBinding instanceof ITypeBinding) {
if (fVariableKind == CONST_FIELD) { modifiers |= Modifier.FINAL | Modifier.STATIC; } else { ASTNode parent= fOriginalNode.getParent(); if (parent instanceof QualifiedName) { IBinding qualifierBinding= ((QualifiedName)parent).getQualifier().resolveBinding(); if (qualifierBinding instanceof ITypeBinding) { modifiers |= Modifier.STATIC; } } else if (ASTResolving.isInStaticContext(fOriginalNode)) {
	private int evaluateFieldModifiers(ASTNode newTypeDecl) {		if (fSenderBinding.isInterface()) {			// for interface members copy the modifiers from an existing field			FieldDeclaration[] fieldDecls= ((TypeDeclaration) newTypeDecl).getFields();			if (fieldDecls.length > 0) {				return fieldDecls[0].getModifiers();			}			return 0;		}		int modifiers= 0;		ASTNode parent= fOriginalNode.getParent();			if (parent instanceof QualifiedName) {			IBinding qualifierBinding= ((QualifiedName)parent).getQualifier().resolveBinding();			if (qualifierBinding instanceof ITypeBinding) {				modifiers |= Modifier.STATIC;			}					} else if (ASTResolving.isInStaticContext(fOriginalNode)) {			modifiers |= Modifier.STATIC;		}		ASTNode node= ASTResolving.findParentType(fOriginalNode);		if (newTypeDecl.equals(node)) {			modifiers |= Modifier.PRIVATE;		} else if (node instanceof AnonymousClassDeclaration) {			modifiers |= Modifier.PROTECTED;		} else {			modifiers |= Modifier.PUBLIC;		}		return modifiers;	}	