Java Code Examples for org.eclipse.jdt.internal.corext.dom.Bindings#findTypeInHierarchy()
The following examples show how to use
org.eclipse.jdt.internal.corext.dom.Bindings#findTypeInHierarchy() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: RemoteServiceUtilities.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 5 votes |
static boolean isSynchronousInterface(ITypeBinding typeBinding) { String qualifiedName = typeBinding.getQualifiedName(); if (qualifiedName.equals(REMOTE_SERVICE_QUALIFIED_NAME) || qualifiedName.equals(RPC_SERVICE_QUALIFIED_NAME)) { // Ignore the RemoteService and RpcService marker interfaces return false; } ITypeBinding remoteServiceBinding = Bindings.findTypeInHierarchy( typeBinding, REMOTE_SERVICE_QUALIFIED_NAME); return remoteServiceBinding != null; }
Example 2
Source File: StubUtility2.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private static void getDelegatableMethods(List<IMethodBinding> methods, IVariableBinding fieldBinding, ITypeBinding typeBinding, ITypeBinding binding, List<DelegateEntry> result) { boolean match= false; if (typeBinding.isTypeVariable()) { ITypeBinding[] typeBounds= typeBinding.getTypeBounds(); if (typeBounds.length > 0) { for (int i= 0; i < typeBounds.length; i++) { getDelegatableMethods(methods, fieldBinding, typeBounds[i], binding, result); } } else { ITypeBinding objectBinding= Bindings.findTypeInHierarchy(binding, "java.lang.Object"); //$NON-NLS-1$ if (objectBinding != null) { getDelegatableMethods(methods, fieldBinding, objectBinding, binding, result); } } } else { IMethodBinding[] candidates= getDelegateCandidates(typeBinding, binding); for (int index= 0; index < candidates.length; index++) { match= false; final IMethodBinding methodBinding= candidates[index]; for (int offset= 0; offset < methods.size() && !match; offset++) { if (Bindings.areOverriddenMethods(methods.get(offset), methodBinding)) match= true; } if (!match) { result.add(new DelegateEntry(methodBinding, fieldBinding)); methods.add(methodBinding); } } final ITypeBinding superclass= typeBinding.getSuperclass(); if (superclass != null) getDelegatableMethods(methods, fieldBinding, superclass, binding, result); ITypeBinding[] superInterfaces= typeBinding.getInterfaces(); for (int offset= 0; offset < superInterfaces.length; offset++) getDelegatableMethods(methods, fieldBinding, superInterfaces[offset], binding, result); } }
Example 3
Source File: ClientBundleUtilities.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 4 votes |
public static boolean isClientBundle(ITypeBinding typeBinding) { ITypeBinding clientBundleBinding = Bindings.findTypeInHierarchy( typeBinding, CLIENT_BUNDLE_TYPE_NAME); return clientBundleBinding != null; }
Example 4
Source File: ClientBundleUtilities.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 4 votes |
public static boolean isResourceType(ITypeBinding typeBinding) { ITypeBinding resourcePrototypeBinding = Bindings.findTypeInHierarchy( typeBinding, RESOURCE_PROTOTYPE_TYPE_NAME); return resourcePrototypeBinding != null; }