Remove Twitter links.
[SquirrelJME.git] / modules / tool-classfile / src / main / java / net / multiphasicapps / classfile / MemberFlags.java
blobe1af038e37ca85a5ae7addf61300a96ba44c04a8
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 Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package net.multiphasicapps.classfile;
12 /**
13 * This is the base class for flags which are for member types.
15 * @param <F> The flag type.
16 * @since 2016/04/23
18 public abstract class MemberFlags<F extends MemberFlag>
19 extends Flags<F>
20 implements AccessibleFlags
22 /**
23 * Initializes the member flags.
25 * @param __cl The required class type.
26 * @param __fl The flags used.
27 * @since 2016/04/23
29 MemberFlags(Class<F> __cl, F[] __fl)
31 super(__cl, __fl);
34 /**
35 * Initializes the member flags.
37 * @param __cl The required class type.
38 * @param __fl The flags used.
39 * @since 2016/04/23
41 MemberFlags(Class<F> __cl, Iterable<F> __fl)
43 super(__cl, __fl);
46 /**
47 * Returns {@code true} if this is final.
49 * @return {@code true} if final.
50 * @since 2016/03/20
52 public abstract boolean isFinal();
54 /**
55 * {@inheritDoc}
56 * @since 2016/03/20
58 @Override
59 public abstract boolean isPrivate();
61 /**
62 * {@inheritDoc}
63 * @since 2016/03/20
65 @Override
66 public abstract boolean isProtected();
68 /**
69 * {@inheritDoc}
70 * @since 2016/03/20
72 @Override
73 public abstract boolean isPublic();
75 /**
76 * Returns {@code true} if this is static.
78 * @return {@code true} if static.
79 * @since 2016/03/20
81 public abstract boolean isStatic();
83 /**
84 * Returns {@code true} if this is synthetic.
86 * @return {@code true} if synthetic.
87 * @since 2016/03/20
89 public abstract boolean isSynthetic();
91 /**
92 * Is this not static?
94 * @return If this is not static.
95 * @since 2018/09/09
97 public final boolean isInstance()
99 return !this.isStatic();
103 * {@inheritDoc}
104 * @since 2016/03/20
106 @Override
107 public final boolean isPackagePrivate()
109 return !this.isPublic() && !this.isProtected() && !this.isPrivate();