C# Class Rhino.ClassCache

Exibir arquivo Open project: hazzik/Rhino.Net

Public Methods

Method 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

Method 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 method

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.
return bool

ClearCaches() public method

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

Get() public static method

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.
return ClassCache

IsCachingEnabled() public method

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
return bool

NewClassSerialNumber() public method

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
return int

SetCachingEnabled() public method

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
return void