public class ClassAttributes extends NameAndSourceAttributes
| Modifier and Type | Field and Description |
|---|---|
static String |
ABSTRACT_CLASS
Type constant.
|
static String |
CLASS
Type constant.
|
static String |
INTERFACE
Type constant.
|
static String |
UNKNOWN
Type constant.
|
| Constructor and Description |
|---|
ClassAttributes(String name,
String source,
String type,
int size)
Creates an instance based on the specified name, type, and size.
|
| Modifier and Type | Method and Description |
|---|---|
static ClassAttributes |
createAbstractClass(String name,
String source,
int size)
Creates an instance of the type
ABSTRACT_CLASS. |
static ClassAttributes |
createClass(String name,
String source,
int size)
Creates an instance of the type
CLASS. |
static ClassAttributes |
createInterface(String name,
String source,
int size)
Creates an instance of the type
INTERFACE. |
static ClassAttributes |
createUnknownClass(String name,
int size)
Creates an instance of the type
UNKNOWN. |
int |
getSize()
Returns the size of the class file in bytes.
|
String |
getType()
Returns the class type.
|
boolean |
isInnerClass()
Returns true in the case of an inner class.
|
String |
toString()
Returns the attributes as a string for pretty printing.
|
addSource, addSourcesOf, getSourcescompareTo, getNamepublic static final String INTERFACE
public static final String ABSTRACT_CLASS
public static final String CLASS
public static final String UNKNOWN
public ClassAttributes(String name, String source, String type, int size)
name - Fully-qualified class name.source - Optional source of the class file. Can be null.type - Type.size - Size.public static ClassAttributes createInterface(String name, String source, int size)
INTERFACE.name - Fully-qualified class name.source - Optional source of the class file. Can be null.size - Size of the class file.public static ClassAttributes createAbstractClass(String name, String source, int size)
ABSTRACT_CLASS.name - Fully-qualified class name.source - Optional source of the class file. Can be null.size - Size of the class file.public static ClassAttributes createClass(String name, String source, int size)
CLASS.name - Fully-qualified class name.source - Optional source of the class file. Can be null.size - Size of the class file.public static ClassAttributes createUnknownClass(String name, int size)
UNKNOWN.name - Fully-qualified class name.size - Size of the class file.public String getType()
INTERFACE, ABSTRACT_CLASS,
CLASS, or UNKNOWN.public boolean isInnerClass()
public int getSize()
getSize in class NameAttributesCopyright © 2014. All rights reserved.