Top Description Inners Fields Constructors Methods
bsh

public Class Capabilities

extends Object
Class Inheritance
Imports
java.util.Hashtable

The map of extended features supported by the runtime in which we live.

This class should be independent of all other bsh classes!

Note that tests for class existence here do *not* use the BshClassManager, as it may require other optional class files to be loaded.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
Capabilities.Unavailable

An attempt was made to use an unavailable capability supported by an optional package.

Field Summary

Modifier and TypeField and Description
private static boolean
private static Hashtable<K, V>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean
public static boolean
classExists(String name)

Use direct Class.forName() to test for the existence of a class.

public static boolean
haveAccessibility()

If accessibility is enabled determine if the accessibility mechanism exists and if we have the optional bsh package to use it.

public static boolean
public static void
setAccessibility(boolean b)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessibilityback to summary
private static boolean accessibility
classesback to summary
private static Hashtable<K, V> classes

Constructor Detail

Capabilitiesback to summary
public Capabilities()

Method Detail

canGenerateInterfacesback to summary
public static boolean canGenerateInterfaces()
classExistsback to summary
public static boolean classExists(String name)

Use direct Class.forName() to test for the existence of a class. We should not use BshClassManager here because: a) the systems using these tests would probably not load the classes through it anyway. b) bshclassmanager is heavy and touches other class files. this capabilities code must be light enough to be used by any system **including the remote applet**.

haveAccessibilityback to summary
public static boolean haveAccessibility()

If accessibility is enabled determine if the accessibility mechanism exists and if we have the optional bsh package to use it. Note that even if both are true it does not necessarily mean that we have runtime permission to access the fields... Java security has a say in it.

See Also
bsh.ReflectManager
haveSwingback to summary
public static boolean haveSwing()
setAccessibilityback to summary
public static void setAccessibility(boolean b) throws Unavailable
bsh back to summary

public Class Capabilities.Unavailable

extends UtilEvalError
Class Inheritance

An attempt was made to use an unavailable capability supported by an optional package. The normal operation is to test before attempting to use these packages... so this is runtime exception.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from bsh.UtilEvalError:
toEvalErrortoEvalError

Constructor Detail

Unavailableback to summary
public Unavailable(String s)