本文整理了Java中org.eclipse.jdt.core.Flags.isEnum()
方法的一些代码示例,展示了Flags.isEnum()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flags.isEnum()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.Flags
类名称:Flags
方法名:isEnum
[英]Returns whether the given integer has the AccEnum
bit set.
[中]返回给定整数是否设置了AccEnum
位。
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private static boolean isEnumConstant(IMember element, int modifiers) {
if (element.getElementType() == IJavaElement.FIELD) {
return Flags.isEnum(modifiers);
}
return false;
}
代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.api.tools
/**
* @see org.eclipse.pde.api.tools.internal.provisional.model.IApiField#isEnumConstant()
*/
@Override
public boolean isEnumConstant() {
return (Flags.isEnum(getModifiers()));
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
*/@Override
public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private static boolean isEnumConstant(IMember element, int modifiers) throws JavaModelException {
if (element.getElementType() == IJavaElement.FIELD) {
return Flags.isEnum(modifiers);
}
return false;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
private static boolean isEnumConstant(IMember element, int modifiers) {
if (element.getElementType() == IJavaElement.FIELD) {
return Flags.isEnum(modifiers);
}
return false;
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
*/public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
/* (non-Javadoc)
代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core
*/public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core
@Override
public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core
*/public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
*/public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core
*/public boolean isEnumConstant() throws JavaModelException {
return Flags.isEnum(getFlags());
}
/* (non-Javadoc)
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private ImageDescriptor getOverlayFromFlags(int flags) {
if (Flags.isAnnotation(flags)) {
return JavaPluginImages.DESC_OVR_ANNOTATION;
} else if (Flags.isEnum(flags)) {
return JavaPluginImages.DESC_OVR_ENUM;
} else if (Flags.isInterface(flags)) {
return JavaPluginImages.DESC_OVR_INTERFACE;
} else if (/* is class */ Flags.isAbstract(flags)) {
return JavaPluginImages.DESC_OVR_ABSTRACT_CLASS;
}
return null;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public static ImageDescriptor getFieldImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
if (Flags.isPublic(flags) || isInInterfaceOrAnnotation || Flags.isEnum(flags))
return JavaPluginImages.DESC_FIELD_PUBLIC;
if (Flags.isProtected(flags))
return JavaPluginImages.DESC_FIELD_PROTECTED;
if (Flags.isPrivate(flags))
return JavaPluginImages.DESC_FIELD_PRIVATE;
return JavaPluginImages.DESC_FIELD_DEFAULT;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
public static ImageDescriptor getFieldImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
if (Flags.isPublic(flags) || isInInterfaceOrAnnotation || Flags.isEnum(flags))
return JavaPluginImages.DESC_FIELD_PUBLIC;
if (Flags.isProtected(flags))
return JavaPluginImages.DESC_FIELD_PROTECTED;
if (Flags.isPrivate(flags))
return JavaPluginImages.DESC_FIELD_PRIVATE;
return JavaPluginImages.DESC_FIELD_DEFAULT;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
private boolean isOfKind(TypeNameMatch curr, int typeKinds, boolean is50OrHigher) {
int flags= curr.getModifiers();
if (Flags.isAnnotation(flags)) {
return is50OrHigher && (typeKinds & TypeKinds.ANNOTATIONS) != 0;
}
if (Flags.isEnum(flags)) {
return is50OrHigher && (typeKinds & TypeKinds.ENUMS) != 0;
}
if (Flags.isInterface(flags)) {
return (typeKinds & TypeKinds.INTERFACES) != 0;
}
return (typeKinds & TypeKinds.CLASSES) != 0;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
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;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public static ImageDescriptor getFieldImageDescriptor(boolean isInInterfaceOrAnnotation, int flags) {
if (Flags.isPublic(flags) || isInInterfaceOrAnnotation || Flags.isEnum(flags))
return JavaPluginImages.DESC_FIELD_PUBLIC;
if (Flags.isProtected(flags))
return JavaPluginImages.DESC_FIELD_PROTECTED;
if (Flags.isPrivate(flags))
return JavaPluginImages.DESC_FIELD_PRIVATE;
return JavaPluginImages.DESC_FIELD_DEFAULT;
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
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;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
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;
}
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
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;
}
内容来源于网络,如有侵权,请联系作者删除!