public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
@Override public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
public boolean isAnnotationMember() { return getDeclaringClass().isAnnotation(); }
private boolean shouldPrefixInterface(ITypeBinding type) { return _configuration.nativeInterfaces() && type.isInterface() && !type.isAnnotation() && !hasMapping(type); }
@Override public Collection<CAstQualifier> getQualifiers() { return JDT2CAstUtils.mapModifiersToQualifiers(fType.getModifiers(), fType.isInterface(), fType.isAnnotation()); }
private static boolean is18OrHigherInterface(ITypeBinding binding) { if (!binding.isInterface() || binding.isAnnotation()) return false; IJavaElement javaElement= binding.getJavaElement(); return javaElement != null && JavaModelUtil.is18OrHigher(javaElement.getJavaProject()); }
private static boolean isInterfaceOrAnnotationMember(IBinding binding) { ITypeBinding declaringType= null; if (binding instanceof IVariableBinding) { declaringType= ((IVariableBinding) binding).getDeclaringClass(); } else if (binding instanceof IMethodBinding) { declaringType= ((IMethodBinding) binding).getDeclaringClass(); } else if (binding instanceof ITypeBinding) { declaringType= ((ITypeBinding) binding).getDeclaringClass(); } return declaringType != null && (declaringType.isInterface() || declaringType.isAnnotation()); }
private static boolean isInterfaceOrAnnotationMember(IBinding binding) { ITypeBinding declaringType= null; if (binding instanceof IVariableBinding) { declaringType= ((IVariableBinding) binding).getDeclaringClass(); } else if (binding instanceof IMethodBinding) { declaringType= ((IMethodBinding) binding).getDeclaringClass(); } else if (binding instanceof ITypeBinding) { declaringType= ((ITypeBinding) binding).getDeclaringClass(); } return declaringType != null && (declaringType.isInterface() || declaringType.isAnnotation()); }
private static boolean isInterfaceOrAnnotationMember(IBinding binding) { ITypeBinding declaringType= null; if (binding instanceof IVariableBinding) { declaringType= ((IVariableBinding) binding).getDeclaringClass(); } else if (binding instanceof IMethodBinding) { declaringType= ((IMethodBinding) binding).getDeclaringClass(); } else if (binding instanceof ITypeBinding) { declaringType= ((ITypeBinding) binding).getDeclaringClass(); } return declaringType != null && (declaringType.isInterface() || declaringType.isAnnotation()); }
private static boolean isInterfaceOrAnnotationMember(IBinding binding) { ITypeBinding declaringType= null; if (binding instanceof IVariableBinding) { declaringType= ((IVariableBinding) binding).getDeclaringClass(); } else if (binding instanceof IMethodBinding) { declaringType= ((IMethodBinding) binding).getDeclaringClass(); } else if (binding instanceof ITypeBinding) { declaringType= ((ITypeBinding) binding).getDeclaringClass(); } return declaringType != null && (declaringType.isInterface() || declaringType.isAnnotation()); }
private static boolean is18OrHigherInterface(ITypeBinding binding) { if (!binding.isInterface() || binding.isAnnotation()) return false; IJavaElement javaElement= binding.getJavaElement(); return javaElement != null && JavaModelUtil.is18OrHigher(javaElement.getJavaProject()); }
public NewDefiningMethodProposal(String label, ICompilationUnit targetCU, ASTNode invocationNode, ITypeBinding binding, IMethodBinding method, String[] paramNames, int relevance) { super(label,targetCU,invocationNode,binding,relevance,null); fMethod= method; fParamNames= paramNames; ImageDescriptor desc= JavaElementImageProvider.getMethodImageDescriptor(binding.isInterface() || binding.isAnnotation(), method.getModifiers()); setImage(JavaPlugin.getImageDescriptorRegistry().get(desc)); }
public NewDefiningMethodProposal(String label, ICompilationUnit targetCU, ASTNode invocationNode, ITypeBinding binding, IMethodBinding method, String[] paramNames, int relevance) { super(label,targetCU,invocationNode,binding,relevance,null); fMethod= method; fParamNames= paramNames; ImageDescriptor desc= JavaElementImageProvider.getMethodImageDescriptor(binding.isInterface() || binding.isAnnotation(), method.getModifiers()); setImage(JavaPlugin.getImageDescriptorRegistry().get(desc)); }
public NewDefiningMethodProposal(String label, ICompilationUnit targetCU, ASTNode invocationNode, ITypeBinding binding, IMethodBinding method, String[] paramNames, int relevance) { super(label,targetCU,invocationNode,binding,relevance,null); fMethod= method; fParamNames= paramNames; ImageDescriptor desc= JavaElementImageProvider.getMethodImageDescriptor(binding.isInterface() || binding.isAnnotation(), method.getModifiers()); setImage(JavaPlugin.getImageDescriptorRegistry().get(desc)); }
public boolean consumes(SemanticToken token) { SimpleName node= token.getNode(); if (node.isDeclaration()) return false; IBinding binding= token.getBinding(); boolean isAbstractMethod= binding != null && binding.getKind() == IBinding.METHOD && (binding.getModifiers() & Modifier.ABSTRACT) == Modifier.ABSTRACT; if (!isAbstractMethod) return false; // filter out annotation value references if (binding != null) { ITypeBinding declaringType= ((IMethodBinding)binding).getDeclaringClass(); if (declaringType.isAnnotation()) return false; } return true; } }
@Override public boolean consumes(SemanticToken token) { // 1: match types SimpleName name= token.getNode(); ASTNode node= name.getParent(); int nodeType= node.getNodeType(); if (nodeType != ASTNode.SIMPLE_TYPE && nodeType != ASTNode.QUALIFIED_TYPE && nodeType != ASTNode.QUALIFIED_NAME && nodeType != ASTNode.ANNOTATION_TYPE_DECLARATION && nodeType != ASTNode.MARKER_ANNOTATION && nodeType != ASTNode.NORMAL_ANNOTATION && nodeType != ASTNode.SINGLE_MEMBER_ANNOTATION) return false; while (nodeType == ASTNode.QUALIFIED_NAME) { node= node.getParent(); nodeType= node.getNodeType(); if (nodeType == ASTNode.IMPORT_DECLARATION) return false; } // 2: match annotations IBinding binding= token.getBinding(); return binding instanceof ITypeBinding && ((ITypeBinding) binding).isAnnotation(); } }
@Override public boolean consumes(SemanticToken token) { SimpleName node= token.getNode(); if (node.isDeclaration()) return false; IBinding binding= token.getBinding(); boolean isAbstractMethod= binding != null && binding.getKind() == IBinding.METHOD && (binding.getModifiers() & Modifier.ABSTRACT) == Modifier.ABSTRACT; if (!isAbstractMethod) return false; // filter out annotation value references if (binding != null) { ITypeBinding declaringType= ((IMethodBinding)binding).getDeclaringClass(); if (declaringType.isAnnotation()) return false; } return true; } }