/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* See JVMS, sections 4.2, 4.6, 4.7.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public class AccessFlags {
this(cr.readUnsignedShort());
}
}
}
}
public int byteLength() {
return 2;
}
private static final int[] classModifiers = {
};
private static final int[] classFlags = {
};
}
}
private static final int[] innerClassModifiers = {
};
private static final int[] innerClassFlags = {
};
}
}
private static final int[] fieldModifiers = {
};
private static final int[] fieldFlags = {
};
}
}
private static final int[] methodModifiers = {
};
private static final int[] methodFlags = {
};
}
}
}
for (int m: modifierFlags) {
if ((flags & m) != 0)
s.add(flagToModifier(m, t));
}
return s;
}
int f = flags;
for (int e: expectedFlags) {
if ((f & e) != 0) {
s.add(flagToName(e, t));
f = f & ~e;
}
}
while (f != 0) {
f = f & ~bit;
}
return s;
}
switch (flag) {
case ACC_PUBLIC:
return "public";
case ACC_PRIVATE:
return "private";
case ACC_PROTECTED:
return "protected";
case ACC_STATIC:
return "static";
case ACC_FINAL:
return "final";
case ACC_SYNCHRONIZED:
return "synchronized";
case 0x80:
case ACC_VOLATILE:
return "volatile";
case ACC_NATIVE:
return "native";
case ACC_ABSTRACT:
return "abstract";
case ACC_STRICT:
return "strictfp";
case ACC_MODULE:
return "module";
default:
return null;
}
}
switch (flag) {
case ACC_PUBLIC:
return "ACC_PUBLIC";
case ACC_PRIVATE:
return "ACC_PRIVATE";
case ACC_PROTECTED:
return "ACC_PROTECTED";
case ACC_STATIC:
return "ACC_STATIC";
case ACC_FINAL:
return "ACC_FINAL";
case 0x20:
case 0x40:
case 0x80:
case ACC_NATIVE:
return "ACC_NATIVE";
case ACC_INTERFACE:
return "ACC_INTERFACE";
case ACC_ABSTRACT:
return "ACC_ABSTRACT";
case ACC_STRICT:
return "ACC_STRICT";
case ACC_SYNTHETIC:
return "ACC_SYNTHETIC";
case ACC_ANNOTATION:
return "ACC_ANNOTATION";
case ACC_ENUM:
return "ACC_ENUM";
case ACC_MODULE:
return "ACC_MODULE";
default:
return null;
}
}
public final int flags;
}