Package org.jboss.byteman.agent
Enum LocationType
- java.lang.Object
-
- java.lang.Enum<LocationType>
-
- org.jboss.byteman.agent.LocationType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<LocationType>
public enum LocationType extends java.lang.Enum<LocationType>
enum categorizing types of locations at which rule triggers can be inserted
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ENTRY
specifies the default location for trigger insertion which is either the first line of a method or the first line of a constructor following any indirection via an alternative constructor or via the super constructor.EXCEPTION_EXIT
specifies a location for trigger insertion on exception exit from the trigger method script syntax : 'AT' 'EXCEPTION' 'EXIT'EXIT
specifies a location for trigger insertion at return from the trigger method n.b.INVOKE
specifies a location for trigger insertion by identifying a method invoke operation or the nth such method invoke if a count is supplied or all method invocations if ALL is specified.INVOKE_COMPLETED
specifies a location for trigger insertion by identifying return from a method invoke operation or the nth such return if a count is supplied or all method invocations if ALL is specified.LINE
specifies a location for trigger insertion via a line number.NEW
specifies a location for trigger insertion at object allocation script syntax : 'AT' 'NEW' [{typename}] [ '[]'+ ] [ {count} | 'ALL' ]NEW_COMPLETED
specifies a location for trigger insertion after object allocation and initialization script syntax : 'AFTER' 'NEW' [{typename}] [ '[]'+ ] [ {count} | 'ALL' ]READ
specifies a location for trigger insertion by identifying a field read operation or the nth such field read if a count is supplied or all field reads if ALL is specified.READ_COMPLETED
specifies a location for trigger insertion by identifying a field read operation or the nth such field read if a count is supplied or all field reads if ALL is specified.SYNCHRONIZE
specifies a location for trigger insertion by identifying a synchronize operation or the nth such operation if a count is supplied or all synchronize operations if ALL is specified.SYNCHRONIZE_COMPLETED
specifies a location for trigger insertion by identifying completion of a synchronize operation or the nth such operation if a count is supplied or all synchronize operations if ALL is specified.THROW
specifies a location for trigger insertion by identifying throw of an exception of the nth such throw if a count is supplied or all throws if ALL is specified script syntax : 'AT' 'THROW' [{typename}] [ {count} | 'ALL' ] n.b.WRITE
specifies a location for trigger insertion by identifying a field write operation or the nth such field write if a count is supplied or all field writes if ALL is specified.WRITE_COMPLETED
specifies a location for trigger insertion by identifying a field write operation or the nth such field write if a count is supplied or all field writes if ALL is specified.
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern[]
specifierPatterns
private static java.lang.String[]
specifiers
private static LocationType[]
types
-
Constructor Summary
Constructors Modifier Constructor Description private
LocationType()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.util.regex.Pattern[]
createPatterns()
static java.lang.String
parameterText(java.lang.String locationSpec)
java.lang.String
specifierText()
static LocationType
type(java.lang.String locationSpec)
static LocationType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static LocationType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ENTRY
public static final LocationType ENTRY
specifies the default location for trigger insertion which is either the first line of a method or the first line of a constructor following any indirection via an alternative constructor or via the super constructor. script syntax : 'AT' 'ENTRY'
-
LINE
public static final LocationType LINE
specifies a location for trigger insertion via a line number. script syntax : 'AT' 'LINE' {linenumber}
-
READ
public static final LocationType READ
specifies a location for trigger insertion by identifying a field read operation or the nth such field read if a count is supplied or all field reads if ALL is specified. script syntax : 'AT' 'READ' [{typename} '.' ] {fieldname} [ {count} | 'ALL' ]
-
READ_COMPLETED
public static final LocationType READ_COMPLETED
specifies a location for trigger insertion by identifying a field read operation or the nth such field read if a count is supplied or all field reads if ALL is specified. script syntax : 'AFTER' 'READ' [{typename} '.' ] {fieldname} [ {count} | 'ALL' ]
-
WRITE
public static final LocationType WRITE
specifies a location for trigger insertion by identifying a field write operation or the nth such field write if a count is supplied or all field writes if ALL is specified. script syntax : 'AT' 'WRITE' [{typename} '.' ] {fieldname} [ {count} | 'ALL' ]
-
WRITE_COMPLETED
public static final LocationType WRITE_COMPLETED
specifies a location for trigger insertion by identifying a field write operation or the nth such field write if a count is supplied or all field writes if ALL is specified. script syntax : 'AFTER' 'WRITE' [{typename} '.' ] {fieldname} [ {count} | 'ALL' ]
-
INVOKE
public static final LocationType INVOKE
specifies a location for trigger insertion by identifying a method invoke operation or the nth such method invoke if a count is supplied or all method invocations if ALL is specified. script syntax : 'AT' 'INVOKE' [{typename} '.' ] {methodname} ['(' {argtypes} ')' [ {count} | 'ALL' ]
-
INVOKE_COMPLETED
public static final LocationType INVOKE_COMPLETED
specifies a location for trigger insertion by identifying return from a method invoke operation or the nth such return if a count is supplied or all method invocations if ALL is specified. script syntax : 'AFTER' 'INVOKE' [{typename} '.' ] {methodname} ['(' {argtypes} ')' [ {count} | 'ALL' ]
-
SYNCHRONIZE
public static final LocationType SYNCHRONIZE
specifies a location for trigger insertion by identifying a synchronize operation or the nth such operation if a count is supplied or all synchronize operations if ALL is specified. script syntax : 'AT' 'SYNCHRONIZE' [ {count} | 'ALL' ]
-
SYNCHRONIZE_COMPLETED
public static final LocationType SYNCHRONIZE_COMPLETED
specifies a location for trigger insertion by identifying completion of a synchronize operation or the nth such operation if a count is supplied or all synchronize operations if ALL is specified. script syntax : 'AFTER' 'SYNCHRONIZE' [ {count} | 'ALL' ]
-
THROW
public static final LocationType THROW
specifies a location for trigger insertion by identifying throw of an exception of the nth such throw if a count is supplied or all throws if ALL is specified script syntax : 'AT' 'THROW' [{typename}] [ {count} | 'ALL' ] n.b. exception typename parsed but not yet implemented
-
EXIT
public static final LocationType EXIT
specifies a location for trigger insertion at return from the trigger method n.b. a trigger will be injected at ALL return points script syntax : 'AT' 'EXIT'
-
EXCEPTION_EXIT
public static final LocationType EXCEPTION_EXIT
specifies a location for trigger insertion on exception exit from the trigger method script syntax : 'AT' 'EXCEPTION' 'EXIT'
-
NEW
public static final LocationType NEW
specifies a location for trigger insertion at object allocation script syntax : 'AT' 'NEW' [{typename}] [ '[]'+ ] [ {count} | 'ALL' ]
-
NEW_COMPLETED
public static final LocationType NEW_COMPLETED
specifies a location for trigger insertion after object allocation and initialization script syntax : 'AFTER' 'NEW' [{typename}] [ '[]'+ ] [ {count} | 'ALL' ]
-
-
Field Detail
-
specifiers
private static java.lang.String[] specifiers
-
specifierPatterns
private static java.util.regex.Pattern[] specifierPatterns
-
types
private static LocationType[] types
-
-
Method Detail
-
values
public static LocationType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LocationType c : LocationType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LocationType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
specifierText
public java.lang.String specifierText()
-
type
public static LocationType type(java.lang.String locationSpec)
-
parameterText
public static java.lang.String parameterText(java.lang.String locationSpec)
-
createPatterns
private static java.util.regex.Pattern[] createPatterns()
-
-