Condividi tramite


Provider.Service.NewInstance(Object) Method

Definition

Return a new instance of the implementation described by this service.

[Android.Runtime.Register("newInstance", "(Ljava/lang/Object;)Ljava/lang/Object;", "GetNewInstance_Ljava_lang_Object_Handler")]
public virtual Java.Lang.Object NewInstance (Java.Lang.Object constructorParameter);
[<Android.Runtime.Register("newInstance", "(Ljava/lang/Object;)Ljava/lang/Object;", "GetNewInstance_Ljava_lang_Object_Handler")>]
abstract member NewInstance : Java.Lang.Object -> Java.Lang.Object
override this.NewInstance : Java.Lang.Object -> Java.Lang.Object

Parameters

constructorParameter
Object

the value to pass to the constructor, or null if this type of service does not use a constructorParameter.

Returns

a new implementation of this service

Attributes

Exceptions

if the instance could not be constructed.

if the implementation does not support the specified constructorParameter.

Remarks

Return a new instance of the implementation described by this service. The security provider framework uses this method to construct implementations. Applications will typically not need to call it.

The default implementation uses reflection to invoke the standard constructor for this type of service. Security providers can override this method to implement instantiation in a different way. For details and the values of constructorParameter that are valid for the various types of services see the

Java Cryptography Architecture API Specification &amp; Reference.

Java documentation for java.security.Provider.Service.newInstance(java.lang.Object).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to