提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
指示给定的类或方法是否抽象。
//package com.nowjava; public class Main { /* 来 自* 时代Java - N o w J a v a . c o m */ public static void main(String[] argv) throws Exception { int access = 2; System.out.println(isAbstract(access)); } /** * The access flag mask for the <code>abstract</code> keyword. This * keyword is usually also present with the * {@link ByteCodeUtils#ACCESS_INTERFACE} * and * {@link ByteCodeUtils#ACCESS_ANNOTATION} * flags for classes. In both of these cases, this flag will be * ignored as both of those types infer <code>abstract</code>. This * will only be present in method and class access flags. * * @see ByteCodeUtils#isAbstract(int) */ private static final int ACCESS_ABSTRACT = 0x0400;