public static IType find(ITypeBinding type, IJavaProject scope) throws JavaModelException { if (type.isPrimitive())
public static IField find(IVariableBinding field, IJavaProject in) throws JavaModelException { Assert.isTrue(field.isField()); ITypeBinding declaringClassBinding = field.getDeclaringClass(); if (declaringClassBinding == null)
	public static IType find(ITypeBinding type, IJavaProject scope) throws JavaModelException {		if (type.isPrimitive())			return null;		String[] typeElements= Bindings.getNameComponents(type);		IJavaElement element= scope.findElement(getPathToCompilationUnit(type.getPackage(), typeElements[0]));		IType candidate= null;		if (element instanceof ICompilationUnit) {			candidate= JavaModelUtil.toWorkingCopy((ICompilationUnit)element).getType(typeElements[0]);		} else if (element instanceof IClassFile) {			candidate= ((IClassFile)element).getType();		} else if (element == null){			if (type.isMember())				candidate= JavaModelUtil.findType(scope, Bindings.getFullyQualifiedImportName(type.getDeclaringClass()));			else				candidate= JavaModelUtil.findType(scope, Bindings.getFullyQualifiedImportName(type));		}				if (candidate == null || typeElements.length == 1)			return candidate;					return findTypeInType(typeElements, candidate);	}