本文整理匯總了Java中com.sun.tools.javac.code.Flags.ANNOTATION屬性的典型用法代碼示例。如果您正苦於以下問題:Java Flags.ANNOTATION屬性的具體用法?Java Flags.ANNOTATION怎麽用?Java Flags.ANNOTATION使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類com.sun.tools.javac.code.Flags
的用法示例。
在下文中一共展示了Flags.ANNOTATION屬性的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getKind
public Kind getKind() {
if ((mods.flags & Flags.ANNOTATION) != 0)
return Kind.ANNOTATION_TYPE;
else if ((mods.flags & Flags.INTERFACE) != 0)
return Kind.INTERFACE;
else if ((mods.flags & Flags.ENUM) != 0)
return Kind.ENUM;
else
return Kind.CLASS;
}
示例2: AnnotationType
public ClassTree AnnotationType(ModifiersTree modifiers,
CharSequence simpleName,
List<? extends Tree> memberDecls) {
long flags = getBitFlags(modifiers.getFlags()) | Flags.ANNOTATION;
return Class(flags, (com.sun.tools.javac.util.List<JCAnnotation>) modifiers.getAnnotations(), simpleName, Collections.<TypeParameterTree>emptyList(), null, Collections.<ExpressionTree>emptyList(), memberDecls);
}
示例3: isClass
/**Checks whether the given tree represents a class.
* @deprecated since 0.67, <code>Tree.getKind() == Kind.CLASS</code> should be used instead.
*/
@Deprecated
public boolean isClass(ClassTree tree) {
return (((JCTree.JCModifiers)tree.getModifiers()).flags & (Flags.INTERFACE | Flags.ENUM | Flags.ANNOTATION)) == 0;
}
示例4: isInterface
/**Checks whether the given tree represents an interface.
* @deprecated since 0.67, <code>Tree.getKind() == Kind.INTERFACE</code> should be used instead.
*/
@Deprecated
public boolean isInterface(ClassTree tree) {
final long flags = ((JCTree.JCModifiers) tree.getModifiers()).flags;
return (flags & Flags.INTERFACE) != 0 && (flags & Flags.ANNOTATION) == 0;
}
示例5: isAnnotation
/**Checks whether the given tree represents an annotation.
* @deprecated since 0.67, <code>Tree.getKind() == Kind.ANNOTATION_TYPE</code> should be used instead.
*/
@Deprecated
public boolean isAnnotation(ClassTree tree) {
return (((JCTree.JCModifiers)tree.getModifiers()).flags & Flags.ANNOTATION) != 0;
}
示例6: isAnnotationType
/**
* Is a ClassSymbol an annotation type?
*/
static boolean isAnnotationType(ClassSymbol clazz) {
return (getFlags(clazz) & Flags.ANNOTATION) != 0;
}