Remove exported everywhere.
[SquirrelJME.git] / modules / tool-classfile / src / main / java / net / multiphasicapps / classfile / MethodFlag.java
blob9ef054d747cb10f2c7f5f7f88ec90e1e162f5bc8
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package net.multiphasicapps.classfile;
12 import cc.squirreljme.runtime.cldc.debug.Debugging;
14 /**
15 * These are flags which are used by methods.
17 * @since 2016/04/23
19 public enum MethodFlag
20 implements MemberFlag
22 /** Public method. */
23 PUBLIC,
25 /** Private method. */
26 PRIVATE,
28 /** Protected method. */
29 PROTECTED,
31 /** Static method. */
32 STATIC,
34 /** Final method. */
35 FINAL,
37 /** Synchronized method. */
38 SYNCHRONIZED,
40 /** Bridge method. */
41 BRIDGE,
43 /** Variable argument method. */
44 VARARGS,
46 /** Native method. */
47 NATIVE,
49 /** Abstract method. */
50 ABSTRACT,
52 /** Strict floating point method. */
53 STRICT,
55 /** Synthetic method. */
56 SYNTHETIC,
58 /* End. */
61 /**
62 * Returns the bit mask which is used for this flag.
64 * @return The bit mask used for the flag.
65 * @since 2017/07/07
67 @Override
68 public final int javaBitMask()
70 switch (this)
72 case PUBLIC: return 0x0001;
73 case PRIVATE: return 0x0002;
74 case PROTECTED: return 0x0004;
75 case STATIC: return 0x0008;
76 case FINAL: return 0x0010;
77 case SYNCHRONIZED: return 0x0020;
78 case BRIDGE: return 0x0040;
79 case VARARGS: return 0x0080;
80 case NATIVE: return 0x0100;
81 case ABSTRACT: return 0x0400;
82 case STRICT: return 0x0800;
83 case SYNTHETIC: return 0x1000;
85 default:
86 throw Debugging.oops();