本文整理汇总了Java中org.eclipse.jdt.core.Flags.isAnnotation方法的典型用法代码示例。如果您正苦于以下问题:Java Flags.isAnnotation方法的具体用法?Java Flags.isAnnotation怎么用?Java Flags.isAnnotation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.Flags
的用法示例。
在下文中一共展示了Flags.isAnnotation方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isOfKind
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
private boolean isOfKind(TypeNameMatch curr, int typeKinds, boolean is50OrHigher) {
int flags= curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && (typeKinds & SimilarElementsRequestor.ANNOTATIONS) != 0;
}
if (Flags.isEnum(flags)) {
return is50OrHigher && (typeKinds & SimilarElementsRequestor.ENUMS) != 0;
}
if (Flags.isInterface(flags)) {
return (typeKinds & SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds & SimilarElementsRequestor.CLASSES) != 0;
}
示例2: getKind
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
private static final int getKind(int flags, char[] typeNameSig) {
if (Signature.getTypeSignatureKind(typeNameSig) == Signature.TYPE_VARIABLE_SIGNATURE) {
return VARIABLES;
}
if (Flags.isAnnotation(flags)) {
return ANNOTATIONS;
}
if (Flags.isInterface(flags)) {
return INTERFACES;
}
if (Flags.isEnum(flags)) {
return ENUMS;
}
return CLASSES;
}
示例3: createTypeImageDescriptor
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
ImageDescriptor createTypeImageDescriptor(CompletionProposal proposal) {
final int flags = proposal.getFlags();
boolean isInterfaceOrAnnotation = Flags.isInterface(flags) || Flags.isAnnotation(flags);
return decorateImageDescriptor(
JavaElementImageProvider.getTypeImageDescriptor(
true /* in order to get all visibility decorations */,
isInterfaceOrAnnotation,
flags,
false),
proposal);
}
示例4: isOfKind
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
private boolean isOfKind(TypeNameMatch curr, int typeKinds, boolean is50OrHigher) {
int flags = curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && ((typeKinds & SimilarElementsRequestor.ANNOTATIONS) != 0);
}
if (Flags.isEnum(flags)) {
return is50OrHigher && ((typeKinds & SimilarElementsRequestor.ENUMS) != 0);
}
if (Flags.isInterface(flags)) {
return (typeKinds & SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds & SimilarElementsRequestor.CLASSES) != 0;
}
示例5: isOfKind
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
private boolean isOfKind(TypeNameMatch curr, int typeKinds, boolean is50OrHigher) {
int flags = curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && (typeKinds & SimilarElementsRequestor.ANNOTATIONS) != 0;
}
if (Flags.isEnum(flags)) {
return is50OrHigher && (typeKinds & SimilarElementsRequestor.ENUMS) != 0;
}
if (Flags.isInterface(flags)) {
return (typeKinds & SimilarElementsRequestor.INTERFACES) != 0;
}
return (typeKinds & SimilarElementsRequestor.CLASSES) != 0;
}
示例6: getKind
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
private static final int getKind(int flags, char[] typeNameSig) {
if (Signature.getTypeSignatureKind(typeNameSig) == Signature.TYPE_VARIABLE_SIGNATURE) {
return VARIABLES;
}
if (Flags.isAnnotation(flags)) {
return ANNOTATIONS;
}
if (Flags.isInterface(flags)) {
return INTERFACES;
}
if (Flags.isEnum(flags)) {
return ENUMS;
}
return CLASSES;
}
示例7: getTypeImageDescriptor
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
public static ImageDescriptor getTypeImageDescriptor(
boolean isInner, boolean isInInterfaceOrAnnotation, int flags, boolean useLightIcons) {
if (Flags.isEnum(flags)) {
if (useLightIcons) {
return JavaPluginImages.DESC_OBJS_ENUM_ALT;
}
if (isInner) {
return getInnerEnumImageDescriptor(isInInterfaceOrAnnotation, flags);
}
return getEnumImageDescriptor(flags);
} else if (Flags.isAnnotation(flags)) {
if (useLightIcons) {
return JavaPluginImages.DESC_OBJS_ANNOTATION_ALT;
}
if (isInner) {
return getInnerAnnotationImageDescriptor(isInInterfaceOrAnnotation, flags);
}
return getAnnotationImageDescriptor(flags);
} else if (Flags.isInterface(flags)) {
if (useLightIcons) {
return JavaPluginImages.DESC_OBJS_INTERFACEALT;
}
if (isInner) {
return getInnerInterfaceImageDescriptor(isInInterfaceOrAnnotation, flags);
}
return getInterfaceImageDescriptor(flags);
} else {
if (useLightIcons) {
return JavaPluginImages.DESC_OBJS_CLASSALT;
}
if (isInner) {
return getInnerClassImageDescriptor(isInInterfaceOrAnnotation, flags);
}
return getClassImageDescriptor(flags);
}
}
示例8: isAnnotation
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
public static boolean isAnnotation(IMember member) throws JavaModelException {
return Flags.isAnnotation(member.getFlags());
}
示例9: isChangeSignatureAvailable
import org.eclipse.jdt.core.Flags; //导入方法依赖的package包/类
public static boolean isChangeSignatureAvailable(final IMethod method) throws JavaModelException {
return Checks.isAvailable(method) && !Flags.isAnnotation(method.getDeclaringType().getFlags());
}