Commit 1e1f2e9d authored by Stephanie Gawroriski's avatar Stephanie Gawroriski
Browse files

Add methods to get if a method name is a static or instance initializer.

parent d6784553
...@@ -56,5 +56,27 @@ public final class MethodName ...@@ -56,5 +56,27 @@ public final class MethodName
{ {
return (__o instanceof MethodName) && super.equals(__o); return (__o instanceof MethodName) && super.equals(__o);
} }
/**
* Returns {@code true} if this represents the instance initializer.
*
* @return {@code true} if this is the instance initializer.
* @since 2017/07/28
*/
public boolean isInstanceInitializer()
{
return this.string.equals("<init>");
}
/**
* Returns {@code true} if this represents the static initializer.
*
* @return {@code true} if this is the static initializer.
* @since 2017/07/28
*/
public boolean isStaticInitializer()
{
return this.string.equals("<clinit>");
}
} }
...@@ -92,7 +92,7 @@ the following address: <xer@multiphasicapps.net>. ...@@ -92,7 +92,7 @@ the following address: <xer@multiphasicapps.net>.
* Personal Accounts (If you wish to contact me this way) * Personal Accounts (If you wish to contact me this way)
* [FurAffinity](https://www.furaffinity.net/user/mpasteven/) * [FurAffinity](https://www.furaffinity.net/user/mpasteven/)
* [GitHub](https://github.com/XerTheSquirrel/) * [GitHub](https://github.com/XerTheSquirrel/)
* [LinkedIn](https://www.linkedin.com/in/steven-gawroriski/) * [LinkedIn](https://www.linkedin.com/in/xerthesquirrel/)
## Goals ## Goals
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment