public class ConstructorUsageEvent extends UsageEvent
ConstructorUsageEvent
describes the information
about a constructor usage that is reported through the
ConstructorUsageListener. It contains the URL, the start/end
offsets of the usage, and a usage code describing the location
the usage occurred, such as the constructor declaration.Modifier and Type | Field and Description |
---|---|
static int |
USAGE_CONSTRUCTOR_DECLARATION
Constant indicating that the usage is a constructor declaration.
|
static int |
USAGE_CONSTRUCTOR_NEW
Constant indicating that the usage is a constructor invocation
through "new
|
static int |
USAGE_CONSTRUCTOR_SUPER
Constant indicating that the usage is a constructor invocation
through "super(...)".
|
static int |
USAGE_CONSTRUCTOR_THIS
Constant indicating that the usage is a constructor invocation
through "this(...)".
|
_endOffset, _source, _startOffset, _url, _usageCode, USAGE_CANCELLED, USAGE_FAILED, USAGE_FINISHED, USAGE_KEYWORD_SKIPPED, USAGE_URL_SKIPPED
Constructor and Description |
---|
ConstructorUsageEvent(UsageQueryTask source,
int usageCode,
java.net.URL url,
int startOffset,
int endOffset)
Construct a new usage event.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
usageCodeToString(int code)
Return a human-readable version of the usage code.
|
getEndOffset, getSource, getStartOffset, getURL, getUsageCode, toString
public static final int USAGE_CONSTRUCTOR_DECLARATION
public static final int USAGE_CONSTRUCTOR_THIS
public static final int USAGE_CONSTRUCTOR_SUPER
public static final int USAGE_CONSTRUCTOR_NEW
public ConstructorUsageEvent(UsageQueryTask source, int usageCode, java.net.URL url, int startOffset, int endOffset)
source
- the query taskusageCode
- the usage code describing this eventurl
- the URL where the event occurredstartOffset
- the starting offsetendOffset
- the ending offsetprotected java.lang.String usageCodeToString(int code)
usageCodeToString
in class UsageEvent
code
- the usage code