當前位置: 首頁>>代碼示例>>Java>>正文


Java Flags.ANNOTATION屬性代碼示例

本文整理匯總了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;
}
 
開發者ID:tranleduy2000,項目名稱:javaide,代碼行數:10,代碼來源:JCTree.java

示例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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:6,代碼來源:TreeFactory.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:TreeUtilities.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:TreeUtilities.java

示例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;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:TreeUtilities.java

示例6: isAnnotationType

/**
 * Is a ClassSymbol an annotation type?
 */
static boolean isAnnotationType(ClassSymbol clazz) {
    return (getFlags(clazz) & Flags.ANNOTATION) != 0;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:6,代碼來源:ClassDocImpl.java


注:本文中的com.sun.tools.javac.code.Flags.ANNOTATION屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。