C# Class Rhino.ClassCache

Afficher le fichier Open project: hazzik/Rhino.Net

Méthodes publiques

Méthode Description
Associate ( ScriptableObject topScope ) : bool

Associate ClassCache object with the given top-level scope.

Associate ClassCache object with the given top-level scope. The ClassCache object can only be associated with the given scope once.

ClearCaches ( ) : void

Empty caches of generated Java classes and Java reflection information.

Empty caches of generated Java classes and Java reflection information.

Get ( Scriptable scope ) : ClassCache

Search for ClassCache object in the given scope.

Search for ClassCache object in the given scope. The method first calls ScriptableObject.GetTopLevelScope(Scriptable) to get the top most scope and then tries to locate associated ClassCache object in the prototype chain of the top scope.

IsCachingEnabled ( ) : bool

Check if generated Java classes and Java reflection information is cached.

Check if generated Java classes and Java reflection information is cached.

NewClassSerialNumber ( ) : int

Internal engine method to return serial number for generated classes to ensure name uniqueness.

Internal engine method to return serial number for generated classes to ensure name uniqueness.

SetCachingEnabled ( bool enabled ) : void

Set whether to cache some values.

Set whether to cache some values.

By default, the engine will cache the results of Class.getMethods() and similar calls. This can speed execution dramatically, but increases the memory footprint. Also, with caching enabled, references may be held to objects past the lifetime of any real usage.

If caching is enabled and this method is called with a false argument, the caches will be emptied.

Caching is enabled by default.

Private Methods

Méthode Description
CacheInterfaceAdapter ( Type cl, object iadapter ) : void
GetAssociatedScope ( ) : Scriptable
GetClassCacheMap ( ) : JavaMembers>.IDictionary
GetInterfaceAdapter ( Type cl ) : object
GetInterfaceAdapterCacheMap ( ) : Type>.IDictionary
IsInvokerOptimizationEnabled ( ) : bool
SetInvokerOptimizationEnabled ( bool enabled ) : void

Method Details

Associate() public méthode

Associate ClassCache object with the given top-level scope.
Associate ClassCache object with the given top-level scope. The ClassCache object can only be associated with the given scope once.
public Associate ( ScriptableObject topScope ) : bool
topScope ScriptableObject scope to associate this ClassCache object with.
Résultat bool

ClearCaches() public méthode

Empty caches of generated Java classes and Java reflection information.
Empty caches of generated Java classes and Java reflection information.
public ClearCaches ( ) : void
Résultat void

Get() public static méthode

Search for ClassCache object in the given scope.
Search for ClassCache object in the given scope. The method first calls ScriptableObject.GetTopLevelScope(Scriptable) to get the top most scope and then tries to locate associated ClassCache object in the prototype chain of the top scope.
public static Get ( Scriptable scope ) : ClassCache
scope Scriptable scope to search for ClassCache object.
Résultat ClassCache

IsCachingEnabled() public méthode

Check if generated Java classes and Java reflection information is cached.
Check if generated Java classes and Java reflection information is cached.
public IsCachingEnabled ( ) : bool
Résultat bool

NewClassSerialNumber() public méthode

Internal engine method to return serial number for generated classes to ensure name uniqueness.
Internal engine method to return serial number for generated classes to ensure name uniqueness.
public NewClassSerialNumber ( ) : int
Résultat int

SetCachingEnabled() public méthode

Set whether to cache some values.
Set whether to cache some values.

By default, the engine will cache the results of Class.getMethods() and similar calls. This can speed execution dramatically, but increases the memory footprint. Also, with caching enabled, references may be held to objects past the lifetime of any real usage.

If caching is enabled and this method is called with a false argument, the caches will be emptied.

Caching is enabled by default.

public SetCachingEnabled ( bool enabled ) : void
enabled bool if true, caching is enabled
Résultat void