diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala | 82 |
1 files changed, 81 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala index e55564ad49..3b60a45b0f 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileConstants.scala @@ -1,5 +1,5 @@ /* NSC -- new Scala compiler - * Copyright 2005-2006 LAMP/EPFL + * Copyright 2005-2008 LAMP/EPFL * @author Martin Odersky */ // $Id$ @@ -12,6 +12,86 @@ object ClassfileConstants { final val JAVA_MAJOR_VERSION = 45 final val JAVA_MINOR_VERSION = 3 + /** <p> + * (see http://java.sun.com/docs/books/jvms/second_edition/jvms-clarify.html) + * </p> + * <p> + * Table 4.1 Class access and property flags + * ------------------------------------------ + * ACC_PUBLIC Declared <code>public</code>; may be accessed from + * outside its package. + * ACC_FINAL Declared <code>final</code>; no subclasses allowed. + * ACC_SUPER Treat superclass methodsd specially when invoked by the + * <code>invokespecial</code> instruction. + * ACC_INTERFACE Is an interface, not a class. + * ACC_ABSTRACT Declared <code>abstract</code>; must not be instantiated. + * ACC_SYNTHETIC Declared <code>synthetic</code>; not present in the source code. + * ACC_ANNOTATION Declared as an annotation type. + * ACC_ENUM Declared as an <code>enum</code> type. + * </p> + * <p> + * If the <code>ACC_INTERFACE</code> flag is set, the <code>ACC_ABSTRACT</code> + * flag must also be set (ch. 2.13.1). + * </p> + * <p> + * A class file cannot have both its <code>ACC_FINAL</code> and + * <code>ACC_ABSTRACT</code> flags set (ch. 2.8.2). + * </p> + * <p> + * Table 4.4 Field access and property flags + * ------------------------------------------ + * ACC_PUBLIC <em>See Table 4.1</em>. + * ACC_PRIVATE Declared <code>private</code>; usable only within + * the defining class. + * ACC_PROTECTED Declared <code>protected</code>; may be accessed within + * subclasses. + * ACC_STATIC Declared <code>static</code>. + * ACC_FINAL Declared <code>final</code>; no further assignment after + * initialization. + * ACC_VOLATILE Declared <code>volatile</code>; cannot be cached. + * ACC_TRANSIENT Declared <code>transient</code>; not written or read by + * a persistent object manager. + * ACC_SYNTHETIC Declared <code>synthetic</code>; not present in the source code. + * ACC_ENUM Declared as an element of an <code>enum</code>. + * </p> + * <p> + * A field may have at most one of its <code>ACC_PRIVATE</code>, + * <code>ACC_PROTECTED</code>, <code>ACC_PUBLIC</code> flags set (ch. 2.7.4). + * </p> + * <p> + * A field may not have both its <code>ACC_FINAL</code> and + * <code>ACC_VOLATILE</code> flags set (ch. 2.9.1). + * </p> + * <p> + * Table 4.5 Method access and property flags + * ------------------------------------------- + * ACC_PUBLIC <em>See Table 4.4</em>. + * ACC_PRIVATE <em>See Table 4.4</em>. + * ACC_PROTECTED <em>See Table 4.4</em>. + * ACC_STATIC <em>See Table 4.4</em>. + * ACC_FINAL Declared <code>final</code>; must no be overridden. + * ACC_SYNCHRONIZED Declared <code>synchronized</code>; + * ACC_BRIDGE A bridge method, generated by the compiler. + * ACC_VARARGS Declared with variable number of arguments. + * ACC_NATIVE Declared <code>native</code>: implemented in a + * language other than Java. + * ACC_ABSTRACT Declared <code>abstract</code>; no implementation + * is provided. + * ACC_STRICT Declared <code>strictfp</code>, floating-point mode + * is FP-strict. + * ACC_SYNTHETIC <em>See Table 4.4</em>. + * </p> + * <p> + * If a method has its <code>ACC_ABSTRACT</code> flag set it must not + * have any of its <code>ACC_FINAL</code>, <code>ACC_NATIVE</code>, + * <code>ACC_PRIVATE</code>, <code>ACC_STATIC</code>, <code>ACC_STRICT</code>, + * or <code>ACC_SYNCHRONIZED</code> flags set (ch. 2.13.3.2). + * </p> + * <p> + * All interface methods must have their <code>ACC_ABSTRACT</code> and + * <code>ACC_PUBLIC</code> flags set. + * </p> + */ final val JAVA_ACC_PUBLIC = 0x0001 final val JAVA_ACC_PRIVATE = 0x0002 final val JAVA_ACC_PROTECTED = 0x0004 |