|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.curjent.impl.agent.MethodInfo
final class MethodInfo
Information for bytecode generation of methods. An instance of this class is created for each unique interface method. The associated task method is included, and the two are evaluated for behavior, such as whether or not the agent call is synchronous.
See ResultInfo
for details on identifying unique methods. One or many
interface methods map to a single task method. One MethodInfo
instance is created for each unique interface method, whereas the associated
task method may be assigned to multiple MethodInfo
instances.
ParamInfo
,
ResultInfo
,
TypeInfo
Field Summary | |
---|---|
(package private) boolean |
call
true if the agent call is asynchronous and the interface
method returns an AgentCall . |
(package private) long |
expirationTimeout
Default call site expiration timeout. |
(package private) TimeUnit |
expirationUnit
Default call site expiration timeout unit. |
(package private) boolean |
future
true if the agent call is asynchronous and the interface
method returns a Future or AgentCall . |
(package private) String |
key
Lookup key for this method. |
(package private) MarkerType |
markerType
Type of Marker . |
(package private) String |
messageInternal
Internal JVM name for the message class. |
(package private) String |
messageName
Name of the message class generated for this method. |
(package private) String |
name
Method's name. |
(package private) ParamInfo[] |
params
Information for the method's parameters. |
(package private) int |
paramTotal
Total stack size for the method's arguments. |
(package private) boolean |
reentrant
true if the task's method is annotated with
Reentrant . |
(package private) ResultInfo |
result
Information on the interface and task results. |
(package private) boolean |
synchronous
true if the agent call is synchronous. |
(package private) String |
taskDescriptor
JVM descriptor for the task's method. |
(package private) Method |
taskMethod
Associated task method. |
(package private) String |
typeDescriptor
JVM descriptor for the interface's method. |
(package private) boolean[] |
typeExceptionCanonicals
Exception blocks are generated only for canonical checked exceptions. |
(package private) String[] |
typeExceptionInternals
Internal JVM names for the interface's declared exceptions. |
(package private) Class<?>[] |
typeExceptions
Interface method's declared exceptions. |
(package private) Method |
typeMethod
Interface's method. |
Constructor Summary | |
---|---|
MethodInfo(Method typeMethod)
Initializes this instance with information from the interface's method. |
Method Summary | |
---|---|
(package private) static String |
getKey(Method method)
Returns the unique key for the given method . |
private static String |
getKey(String name,
String descriptor)
Returns the unique key for a method's name and its JVM
descriptor . |
(package private) void |
setTaskMethod(Method taskMethod)
Associates the interface method with the given task method. |
(package private) void |
setTypeIndex(TypeInfo typeInfo,
int index)
Creates the name of the message class based on the interface method's unique index. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
String key
getKey(Method)
String name
Method.getName()
Method typeMethod
MethodInfo
instances and interface methods.
Method taskMethod
MethodInfo
instances.
String typeDescriptor
getKey(Method)
method is
"(Ljava/lang/reflect/Method;)Ljava/lang/String;"
.
String taskDescriptor
ParamInfo[] params
null
.
int paramTotal
ParamInfo.size
ResultInfo result
Class<?>[] typeExceptions
Method.getExceptionTypes()
String[] typeExceptionInternals
"java/lang/Exception"
for Exception
. This value
is null
if there are no declared exceptions.
boolean[] typeExceptionCanonicals
IOException
and
FileNotFoundException
, a try-catch declaration is only
generated for IOException
.
String messageName
String messageInternal
MarkerType markerType
Marker
. null
for non-marker calls.
boolean future
true
if the agent call is asynchronous and the interface
method returns a Future
or AgentCall
.
ResultInfo.messageFuture
boolean call
true
if the agent call is asynchronous and the interface
method returns an AgentCall
.
ResultInfo.messageCall
boolean synchronous
true
if the agent call is synchronous.
ResultInfo.messageSynchronous
boolean reentrant
true
if the task's method is annotated with
Reentrant
.
long expirationTimeout
NIL
unless the
method is configured with an Expiration
annotation.
TimeUnit expirationUnit
NANOSECONDS
unless the method is configured with an Expiration
annotation.
Constructor Detail |
---|
MethodInfo(Method typeMethod)
Method Detail |
---|
static String getKey(Method method)
method
. This includes
the method's name and the JVM descriptor for the method, less the return
type. For example, the key for this method is
"getKey(Ljava/lang/reflect/Method;)"
.
The return type is excluded in order to map interface methods to task
methods. This mapping includes the methods' names and parameters but not
their return types. See ResultInfo
for details on uniquely
identified methods.
private static String getKey(String name, String descriptor)
name
and its JVM
descriptor
.
getKey(Method)
void setTypeIndex(TypeInfo typeInfo, int index)
void setTaskMethod(Method taskMethod)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |