Microsoft SDK for Java

Delegate Class Constructors

The Delegate class contains the following constructor:

Delegate(Object objTarget, String strMethodName, String strMethodSignature)

Constructs a delegate that references a given object and a given method of that object. Since Delegate is an abstract class, this constructor is never invoked directly. Instead, subclasses of Delegate should implement a constructor with the same parameters and simply call this inherited constructor. The strMethodName parameter must denote a method in the target object with a signature that is identical to the invoke method of the specific delegate implementation. If this is not the case, a RuntimeException is thrown.

Syntax

protected Delegate(Object objTarget, String strMethodName, String strMethodSignature);

Parameters

objTarget The target object of the delegate.
strMethodName The name of the target method of the delegate.
strMethodSignature The parameter signature of the target method.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.