APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.tools.jdi

pack-priv abstract Class InvokableTypeImpl

extends ReferenceTypeImpl
Class Inheritance
Known Direct Subclasses
com.sun.tools.jdi.ClassTypeImpl, com.sun.tools.jdi.InterfaceTypeImpl
Imports
java.util.ArrayList, .List, .Map, .Set, com.sun.jdi.ClassNotLoadedException, .ClassType, .IncompatibleThreadStateException, .InterfaceType, .InvalidTypeException, .InvocationException, .Method, .ReferenceType, .ThreadReference, .VMCannotBeModifiedException, .Value, .VirtualMachine

A supertype for ReferenceTypes allowing method invocations

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface
InvokableTypeImpl.InvocationResult

The invocation result wrapper It is necessary because both ClassType and InterfaceType use their own type to represent the invocation result

Field Summary

Inherited from com.sun.tools.jdi.ReferenceTypeImpl:
modifiersNO_SDE_INFO_MARKref

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv final void
pack-priv final void
public final List<Method>

Returns:

A list of all methods (recursively)
allMethods
()

Implements abstract com.sun.tools.jdi.ReferenceTypeImpl.allMethods.

Implements com.sun.jdi.ReferenceType.allMethods.

Shared implementation of ClassType#allMethods() and InterfaceType#allMethods()

pack-priv abstract boolean

Returns:

TRUE if the implementation knows how to invoke the method, FALSE otherwise
canInvoke
(Method
the method to check
method
)

Checks the provided method whether it can be invoked

pack-priv final List<InterfaceType>

Returns:

A list of all the implemented interfaces (recursively)
getAllInterfaces
()

Returns all the implemented interfaces recursively

pack-priv abstract CommandSender

Returns:

the specific CommandSender instance
getInvokeMethodSender
(ThreadReferenceImpl
the current invocation thread
thread
,
MethodImpl
the method to invoke
method
,
ValueImpl[]
the arguments to pass to the method
args
,
int
the integer bit flag options
options
)

A subclass will provide specific CommandSender

pack-priv final List<ReferenceType>
pack-priv abstract List<InterfaceType>

Returns:

the list of implemented/extended interfaces
interfaces
()

Get the implemented/extended interfaces

public final Value

Returns:

a Value mirror of the invoked method's return value.
invokeMethod
(ThreadReference
the thread in which to invoke.
threadIntf
,
Method
method the Method to invoke.
methodIntf
,
List<? extends Value>
the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.
origArguments
,
int
the integer bit flag options.
options
)

Method invocation support.

pack-priv boolean
private PacketStream
sendInvokeCommand(final ThreadReferenceImpl thread, final MethodImpl method, final ValueImpl[] args, final int options)

pack-priv abstract ClassType

Returns:

the superclass or null
superclass
()

Get the ReferenceType superclass

private void
pack-priv abstract InvokableTypeImpl.InvocationResult

Returns:

the InvocationResult instance
waitForReply
(PacketStream
the stream to listen for the reply on
stream
)

Waits for the reply to the last sent command

Inherited from com.sun.tools.jdi.ReferenceTypeImpl:
addAllFieldsaddToMethodMapaddVisibleFieldsallFieldsallLineLocationsallLineLocationsavailableStratabaseSourceDirbaseSourceNamebaseSourcePathclassLoaderclassObjectcompareToconstantPoolconstantPoolCountdecodeStatusdefaultStratumequalsfailedToInitializefieldByNamefieldsfindTypegenericSignaturegetFieldMirrorgetInterfacesgetMethodMirrorgetModifiersgetValuegetValueshashCodeindexOfindexOfinstancesisAbstractisAssignableFromisAssignableFromisFinalisInitializedisPackagePrivateisPreparedisPrivateisProtectedisPublicisStaticisVerifiedloaderStringlocationsOfLinelocationsOfLinemajorVersionmarkPreparedmethodsmethodsByNamemethodsByNameminorVersionmodifiersmodulenestedTypesnoticeRedefineClassrefsetGenericSignaturesetSignaturesetStatussignaturesourceDebugExtensionsourceNamesourceNamessourcePathsstratumupdateStatusvalidateFieldAccessvalidateFieldSetvisibleFieldsvisibleMethods

Constructor Detail

InvokableTypeImplback to summary
pack-priv InvokableTypeImpl(VirtualMachine aVm, long aRef)

Method Detail

addInterfacesback to summary
pack-priv final void addInterfaces(List<InterfaceType> list)
addVisibleMethodsback to summary
pack-priv final void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces)

Implements abstract com.sun.tools.jdi.ReferenceTypeImpl.addVisibleMethods.

Annotations
@Override
allMethodsback to summary
public final List<Method> allMethods()

Implements abstract com.sun.tools.jdi.ReferenceTypeImpl.allMethods.

Implements com.sun.jdi.ReferenceType.allMethods.

Shared implementation of ClassType#allMethods() and InterfaceType#allMethods()

Returns:List<Method>

A list of all methods (recursively)

canInvokeback to summary
pack-priv abstract boolean canInvoke(Method method)

Checks the provided method whether it can be invoked

Parameters
method:Method

the method to check

Returns:boolean

TRUE if the implementation knows how to invoke the method, FALSE otherwise

getAllInterfacesback to summary
pack-priv final List<InterfaceType> getAllInterfaces()

Returns all the implemented interfaces recursively

Returns:List<InterfaceType>

A list of all the implemented interfaces (recursively)

getInvokeMethodSenderback to summary
pack-priv abstract CommandSender getInvokeMethodSender(ThreadReferenceImpl thread, MethodImpl method, ValueImpl[] args, int options)

A subclass will provide specific CommandSender

Parameters
thread:ThreadReferenceImpl

the current invocation thread

method:MethodImpl

the method to invoke

args:ValueImpl[]

the arguments to pass to the method

options:int

the integer bit flag options

Returns:CommandSender

the specific CommandSender instance

inheritedTypesback to summary
pack-priv final List<ReferenceType> inheritedTypes()

Implements abstract com.sun.tools.jdi.ReferenceTypeImpl.inheritedTypes.

Annotations
@Override
interfacesback to summary
pack-priv abstract List<InterfaceType> interfaces()

Get the implemented/extended interfaces

Returns:List<InterfaceType>

the list of implemented/extended interfaces

invokeMethodback to summary
public final Value invokeMethod(ThreadReference threadIntf, Method methodIntf, List<? extends Value> origArguments, int options) throws InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException, InvocationException

Method invocation support. Shared by ClassType and InterfaceType

Parameters
threadIntf:ThreadReference

the thread in which to invoke.

methodIntf:Method

method the Method to invoke.

origArguments:List<? extends Value>

the list of Value arguments bound to the invoked method. Values from the list are assigned to arguments in the order they appear in the method signature.

options:int

the integer bit flag options.

Returns:Value

a Value mirror of the invoked method's return value.

Exceptions
InvalidTypeException:
If the arguments do not meet this requirement -- Object arguments must be assignment compatible with the argument type. This implies that the argument type must be loaded through the enclosing class's class loader. Primitive arguments must be either assignment compatible with the argument type or must be convertible to the argument type without loss of information. See JLS section 5.2 for more information on assignment compatibility.
ClassNotLoadedException:
if any argument type has not yet been loaded through the appropriate class loader.
IncompatibleThreadStateException:
if the specified thread has not been suspended by an event.
InvocationException:
if the method invocation resulted in an exception in the target VM.
IllegalArgumentException:
if the method is not a member of this type, if the size of the argument list does not match the number of declared arguments for the method, or if the method is not static or is a static initializer.
VMCannotBeModifiedException:
if the VirtualMachine is read-only - see VirtualMachine#canBeModified().
isAssignableToback to summary
pack-priv boolean isAssignableTo(ReferenceType type)

Implements abstract com.sun.tools.jdi.ReferenceTypeImpl.isAssignableTo.

Annotations
@Override
sendInvokeCommandback to summary
private PacketStream sendInvokeCommand(final ThreadReferenceImpl thread, final MethodImpl method, final ValueImpl[] args, final int options)
superclassback to summary
pack-priv abstract ClassType superclass()

Get the ReferenceType superclass

Returns:ClassType

the superclass or null

validateMethodInvocationback to summary
private void validateMethodInvocation(Method method) throws InvalidTypeException, InvocationException
waitForReplyback to summary
pack-priv abstract InvokableTypeImpl.InvocationResult waitForReply(PacketStream stream) throws JDWPException

Waits for the reply to the last sent command

Parameters
stream:PacketStream

the stream to listen for the reply on

Returns:InvokableTypeImpl.InvocationResult

the InvocationResult instance

Exceptions
JDWPException:
when something goes wrong in JDWP
com.sun.tools.jdi back to summary

pack-priv Interface InvokableTypeImpl.InvocationResult

Known Direct Implementers
com.sun.tools.jdi.ClassTypeImpl.IResult, com.sun.tools.jdi.InterfaceTypeImpl.IResult

The invocation result wrapper It is necessary because both ClassType and InterfaceType use their own type to represent the invocation result

Method Summary

Modifier and TypeMethod and Description
public ObjectReferenceImpl
public ValueImpl

Method Detail

getExceptionback to summary
public ObjectReferenceImpl getException()
getResultback to summary
public ValueImpl getResult()