public class DeclarationType extends java.lang.Object implements java.lang.Comparable, Type
The default order for comparing is: ordinary Java method names, mutator,
accessor/tester. This can be changed via setOrder(java.lang.String)
.
Modifier and Type | Field and Description |
---|---|
static DeclarationType |
CLASS
Represents a class declaration.
|
static int |
CLASS_INT
The bit value for classes.
|
static DeclarationType |
CTOR
Represents a constructor declaration.
|
static int |
CTOR_INT
The bit value for constructors.
|
static DeclarationType |
INIT
Represents an instance initializer.
|
static int |
INIT_INT
The bit value for instance initializers.
|
static DeclarationType |
INTERFACE
Represents an interface declaration.
|
static int |
INTERFACE_INT
The bit value for interfaces.
|
static DeclarationType |
METHOD
Represents a method declaration.
|
static int |
METHOD_INT
The bit value for methods.
|
static int |
STATIC_VAR_INIT_INT
The bit value for static variables/initializers.
|
static DeclarationType |
STATIC_VARIABLE_INIT
Represents a static variable declaration or initializer.
|
static DeclarationType |
VARIABLE
Represents an instance variable declaration.
|
static int |
VARIABLE_INT
The bit value for instance variables.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.Object other)
Compares this object with the specified object for order.
|
java.lang.String |
getDisplayName()
DOCUMENT ME!
|
java.lang.String |
getName()
Returns the name of this type.
|
static java.lang.String |
getOrder()
Returns a string representation of the current sort order.
|
static void |
setOrder(java.lang.String str)
Sets the order to use as the natural order.
|
java.lang.String |
toString()
Returns a string representation of this method type.
|
static DeclarationType |
valueOf(java.lang.String name)
Returns the declaration type of the given abreviation.
|
public static final int CLASS_INT
public static final int CTOR_INT
public static final int INIT_INT
public static final int INTERFACE_INT
public static final int METHOD_INT
public static final int VARIABLE_INT
public static final int STATIC_VAR_INIT_INT
public static final DeclarationType CLASS
public static final DeclarationType INTERFACE
public static final DeclarationType VARIABLE
public static final DeclarationType INIT
public static final DeclarationType CTOR
public static final DeclarationType METHOD
public static final DeclarationType STATIC_VARIABLE_INIT
public java.lang.String getName()
public static void setOrder(java.lang.String str)
str
- a string representing the new order. The string must consist of exactly
four different, comma delimited strings which represents a method type.java.lang.IllegalArgumentException
- if the given string is invalid.public static java.lang.String getOrder()
Variable,Initializer,Constructor,Method,Interface,Classor any combination thereof.
public java.lang.String getDisplayName()
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable
other
- the object to be compared.java.lang.ClassCastException
- if the specified object's type prevents it from being
compared to this object.public java.lang.String toString()
toString
in class java.lang.Object
public static DeclarationType valueOf(java.lang.String name)
name
- a declaration identifier.java.lang.IllegalArgumentException
- if no valid declaration identifier was given.
Submit a bug or feature.
For further information and documentation, visit the official Jalopy website.
This page generated: March 30 2013