public static AccessorClassReference getAccessorClassReference(CompilationUnit astRoot, IRegion region) { ASTNode nlsStringLiteral= NodeFinder.perform(astRoot, region.getOffset(), region.getLength()); if (nlsStringLiteral == null) { return null; } ASTNode parent= nlsStringLiteral.getParent(); if (!(parent instanceof MethodInvocation)) { return null; }  MethodInvocation methodInvocation= (MethodInvocation) parent; List args= methodInvocation.arguments(); if (args.indexOf(nlsStringLiteral) != 0) { return null; }  IMethodBinding methodBinding= methodInvocation.resolveMethodBinding(); if (methodBinding == null || !Modifier.isStatic(methodBinding.getModifiers())) { return null; }  ITypeBinding accessorBinding= methodBinding.getDeclaringClass(); if (isAccessorCandidate(accessorBinding)) { return new AccessorClassReference(accessorBinding, new Region(parent.getStartPosition(), parent.getLength())); } return null;
public static AccessorClassReference getAccessorClassReference(CompilationUnit astRoot, NLSElement nlsElement) { IRegion region= nlsElement.getPosition(); return getAccessorClassReference(astRoot, region);
	public static AccessorClassReference getAccessorClassReference(CompilationUnit astRoot, IRegion region) {		ASTNode nlsStringLiteral= NodeFinder.perform(astRoot, region.getOffset(), region.getLength());		if (nlsStringLiteral == null) {			return null; // not found		}		ASTNode parent= nlsStringLiteral.getParent();		if (!(parent instanceof MethodInvocation)) {			return null;		}				MethodInvocation methodInvocation= (MethodInvocation) parent;		List args= methodInvocation.arguments();		if (args.indexOf(nlsStringLiteral) != 0) {			return null; // must be first argument in lookup method		}					IMethodBinding methodBinding= methodInvocation.resolveMethodBinding();		if (methodBinding == null || !Modifier.isStatic(methodBinding.getModifiers())) {			return null; // only static methods qualify		}		ITypeBinding accessorBinding= methodBinding.getDeclaringClass();		if (isAccessorCandidate(accessorBinding)) {			return new AccessorClassReference(accessorBinding, new Region(parent.getStartPosition(), parent.getLength()));		}		return null;	}