1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
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
;
13 * This is the base class for flags which are for member types.
15 * @param <F> The flag type.
18 public abstract class MemberFlags
<F
extends MemberFlag
>
20 implements AccessibleFlags
23 * Initializes the member flags.
25 * @param __cl The required class type.
26 * @param __fl The flags used.
29 MemberFlags(Class
<F
> __cl
, F
[] __fl
)
35 * Initializes the member flags.
37 * @param __cl The required class type.
38 * @param __fl The flags used.
41 MemberFlags(Class
<F
> __cl
, Iterable
<F
> __fl
)
47 * Returns {@code true} if this is final.
49 * @return {@code true} if final.
52 public abstract boolean isFinal();
59 public abstract boolean isPrivate();
66 public abstract boolean isProtected();
73 public abstract boolean isPublic();
76 * Returns {@code true} if this is static.
78 * @return {@code true} if static.
81 public abstract boolean isStatic();
84 * Returns {@code true} if this is synthetic.
86 * @return {@code true} if synthetic.
89 public abstract boolean isSynthetic();
94 * @return If this is not static.
97 public final boolean isInstance()
99 return !this.isStatic();
107 public final boolean isPackagePrivate()
109 return !this.isPublic() && !this.isProtected() && !this.isPrivate();