Global cache for things we know are classes.
Global cache for things we know are *not* classes.
Add a NameSource which is monitored for names.
Add a NameCompletionTable, which is more optimized than the more
general NameSource
Used to convert raw characters to their escaped version
when these raw version cannot be used as part of an ASCII
string literal.
Add the specified BshClassPath as a component of our path.
Replaces unprintable characters by their espaced (or unicode escaped)
equivalents in the given string
Implements NameSource
Add a listener who is notified upon changes to names in this space.
Implements NameSource
Add a listener who is notified upon changes to names in this space.
Method to adjust line and column numbers for the start of a token.
An old AWT based console for BeanShell.
Run bsh as an applet for demo purposes.
A lightweight console applet for remote display of a Beanshell session.
An implementation that works with JDK 1.1
Construct a basic BasicBshIterator
beginLine and beginColumn describe the position of the first character
of this token; endLine and endColumn describe the position of the
last character of this token.
beginLine and beginColumn describe the position of the first character
of this token; endLine and endColumn describe the position of the
last character of this token.
Perform a binary operation on two Primitives or wrapper types.
Bind a This reference to a parent's namespace with the specified
declaring interpreter.
The overridden read method in this class will not throw "Broken pipe"
IOExceptions; It will simply wait for new writers and data.
Scriptable Canvas with buffered graphics.
One of the things BshClassLoader does is to address a deficiency in
URLClassLoader that prevents us from specifying individual classes
via URLs.
BshClassManager manages all classloading in BeanShell.
A BshClassPath encapsulates knowledge about a class path of URLs.
An interface implemented by classes wrapping instances of iterators,
enumerations, collections, etc.
This represents an instance of a bsh method declaration in a particular
namespace.
Cache info about whether name is a class or not.
Cache a resolved (possibly overloaded) method based on the
argument types used to invoke it, subject to classloader change.
A stack of NameSpaces representing the call path.
Create a proper class name from a messy thing.
The map of extended features supported by the runtime in which we live.
Dissallow static vars outside of a class
A simple class browser for the BeanShell desktop.
Use direct Class.forName() to test for the existence of a class.
Load the specified class by name, taking into account added classpath
and reloaded classes, etc.
*
This file is part of the BeanShell Java Scripting distribution.
Clear global class cache and notify namespaces to clear their
class caches.
Clear all cached classes and names
Manage all classloading in BeanShell.
Used by BshClassManager singleton constructor
Provide feedback on the progress of mapping the classpath
*
This file is part of the BeanShell Java Scripting distribution.
*
This file is part of the BeanShell Java Scripting distribution.
Clear all variables, methods, and imports from this namespace.
Clear the caches in BshClassManager
The default CollectionManager (which remains Java 1.1 compatible)
supports iteration over objects of type:
Enumeration, Vector, String, StringBuffer and array.
Return an array containing a string element of the maximum
unambiguous namespace completion or, if there is no common prefix,
return the list of ambiguous names.
Return an array containing a string element of the maximum
unambiguous namespace completion or, if there is no common prefix,
return the list of ambiguous names.
The capabilities of a minimal console for BeanShell.
Occasionally we need to freeze the callstack for error reporting
purposes, etc.
Create a new instance of the class manager.
Create an enumeration over the given object
This is the last token that has been consumed successfully.
beginLine and beginColumn describe the position of the first character
of this token; endLine and endColumn describe the position of the
last character of this token.
beginLine and beginColumn describe the position of the first character
of this token; endLine and endColumn describe the position of the
last character of this token.
The end of line string for this machine.
Primitives compare equal with other Primitives containing an equal
wrapped value.
Print an error message in a standard format on the output stream
associated with this interpreter.
Evaluate the inputstream in this interpreter's global namespace.
Spawn a non-interactive local interpreter to evaluate text in the
specified namespace.
Evaluate the string in this interpreter's global namespace.
Evaluate the string in the specified namespace.
Evaluate text in the interpreter at url, capturing output into
output and returning a possible integer return value.
EvalError indicates that we cannot continue evaluating the script
or the script has thrown an exception.
Each entry in this array is an array of integers.
Get the value of the name.
Resolve name to an object through this namespace.
Helper for implementing NameSource
Get the argument types of this method.
Determine if the RHS object can be assigned to the LHS type:
1) As in a legal Java assignment (as determined by
Reflect.isJavaAssignable()) through widening or promotion
2) Via special BeanShell extensions like interface generation or
(gag) numeric-style promotion of primitive wrappers
(e.g.
Get the boot path including the lib/rt.jar if possible.
Get a buffered (persistent) image for drawing on this component
Load a class through this namespace taking into account imports.
Return the set of class names in the specified package
including all component paths.
Get the class manager associated with this interpreter
(the BshClassManager of this interpreter's global namespace).
Return the name or null if none is found,
Throw an ClassPathException containing detail if name is ambigous.
Support for super import "*";
Get the full name associated with the unqualified name in this
classpath.
Return the name or null if none is found,
Throw an ClassPathException containing detail if name is ambigous.
Get the full blown classpath.
Return the source of the specified class
which may lie in component path
A command is a scripted method or compiled command class implementing a
specified method signature.
Get the appropriate default value per JLS 4.5.4
Get the error output stream associated with this interpreter.
Get the full path including component paths.
Get the top level namespace or this namespace if we are the top.
Get the input stream associated with this interpreter.
Get a reference to the interpreter (global namespace), cast
to the specified interface type.
Get a version of this scripted object implementing the specified
interface.
Get a version of this scripted object implementing the specified
interfaces.
Add any matching names to list (including any from other tables)
You can also modify the body of this method to customize your error messages.
This method has the standard behavior when this object has been
created using the standard constructors.
Get the bsh method matching the specified signature declared in
this name space or a parent.
Get the names of methods defined in this namespace.
Get the methods defined in this namespace.
Get the global namespace of this interpreter.
Get the outptut stream associated with this interpreter.
Get a list of all of the known packages
Get the parent Interpreter of this interpreter, if any.
Get the parent namespace.
Get the path components including any component paths.
Return the singleton bsh ReflectManager.
Return a previously cached resolved method.
Get a resource URL using the BeanShell classpath
Get a resource URL using the BeanShell classpath
Get a resource stream using the BeanShell classpath
Get a resource stream using the BeanShell classpath
Get the return type of the method.
Specify the source of the text from which this interpreter is reading.
Get the parent namespace or this namespace if we are the top.
Get the corresponding primitive TYPE class for the Primitive
A BshClassPath initialized to the user path
from java.class.path
Return the primitive value stored in its java.lang wrapper class
Get the specified variable in this namespace or a parent namespace.
Get the specified variable in this namespace.
Locate a variable and return the Variable object with optional
recursion through parent name spaces.
Get the names of variables defined in this namespace.
Additional capabilities of an interactive console for BeanShell.
The hash of the Primitive is tied to the hash of the wrapped value but
shifted so that they are not the same.
Returns true if and only if there are more objects available
via the next()
method
Returns true if and only if there are more objects available
via the next()
method
A "super import" ("import *") operation has been performed.
A "super import" ("import *") operation has been performed.
If accessibility is enabled
determine if the accessibility mechanism exists and if we have
the optional bsh package to use it.
A very simple httpd that supports the remote server mode.
This is a helper method for working inside of bsh scripts and commands.
The string image of the token.
Import scripted or compiled BeanShell commands in the following package
in the classpath.
subsequent imports override earlier ones
Return true if the TargetError was generated from native code.
If the claspath map is not initialized, do it now.
The BeanShell script interpreter.
Create an interpreter for evaluation only.
Construct a new interactive interpreter attached to the specified
console.
Construct a new interactive interpreter attached to the specified
console using the specified parent namespace.
An internal error in the interpreter has occurred.
Invoke the declared method with the specified arguments and interpreter
reference.
Invoke the declared method with the specified arguments, interpreter
reference, and callstack.
Invoke the bsh method with the specified args, interpreter ref,
and callstack.
Invoke specified method as from outside java code, using the
declaring interpreter and current namespace.
Invoke a method in this namespace with the specified args and
interpreter reference.
This method simply delegates to This.invokeMethod();
Invoke a method in this namespace with the specified args,
interpreter reference, callstack, and caller info.
Determine if this primitive is a numeric type.
This is a hook to allow ClassNameSpace to add functionality to
getMethod()
This is a hook to allow ClassNameSpace to add functionality here.
The interface for name completion.
NameCompletionTable is a utility that implements simple name completion for
a collection of names, NameSources, and other NameCompletionTables.
This interface supports name completion, which is used primarily for
command line tools, etc.
A namespace in which methods, variables, and imports (class names) live.
Clear all cached classes and names
Returns a new Token object, by default.
A reference to the next regular (non-special) token from the input
stream.
Fetch the next object in the iteration
Fetch the next object in the iteration
Annotate the NoClassDefFoundError with some info about the class
we were trying to load.
Hack - The real method is in Reflect.java which is not public.
The name of this namespace.
This exception is thrown when parse errors are encountered.
The following constructors are for use by you for whatever
purpose you can think of.
This constructor is used by the method "generateParseException"
in the generated parser.
This is the BeanShell parser.
Localize a path to the file name based on the bsh.cwd interpreter
working directory.
Perform a plain Class.forName() or call the externally provided
classloader.
Delegate for bottom level implementation of Class.forName().
Prepend the message if it is non-null.
Wrapper for primitive types in Bsh.
Prints the primitive type "float"
(needed because of float->double
coercion weirdness)
public void println(float f) {
println(String.valueOf(f));
}
Prints the primitive type "float"
(needed because of float->double
coercion weirdness)
public void print(float f) {
print(String.valueOf(f));
}
Generate a printable string showing the wrapped target exception.
ReflectManager is a dynamically loaded extension that supports extended
reflection features supported by JDK1.2 and greater.
This is the implementation of:
ReflectManager - a dynamically loaded extension that supports extended
reflection features supported by JDK1.2 and greater.
Overlay the entire path with a new class loader.
Overlay the entire path with a new class loader.
Reloading classes means creating a new classloader and using it
whenever we are asked for classes in the appropriate space.
Reloading classes means creating a new classloader and using it
whenever we are asked for classes in the appropriate space.
Reload all classes in the specified package: e.g.
Reload all classes in the specified package: e.g.
Return a new collection without any inner class names
Clear all loaders and start over.
Clear all classloading behavior and class caches and reset to
initial state.
Caches for resolved object and static methods.
Re-throw the error, prepending the specified message.
Reflect Manager Set Accessible.
BeanShell remote session server.
This is kind of crazy, but used by the setNameSpace command.
Assign the value to the name.
Set a java.lang.reflect Field, Method, Constructor, or Array of
accessible objects to accessible mode.
Set a java.lang.reflect Field, Method, Constructor, or Array of
accessible objects to accessible mode.
Set an external class loader.
Set an external class loader to be used for all basic class loading
in BeanShell.
Set a new base classpath and create a new base classloader.
Set a new base classpath and create a new base classloader.
Attach a console
Note: this method is incomplete.
Used to add source file info to exception
Specify whether, in interactive mode, the interpreter exits Java upon
end of input.
Note: this is primarily for internal use.
Set the global namespace for this interpreter.
Set strict Java mode on or off.
Declare a variable in the local scope and set its initial value.
Set the variable through this namespace.
Read text from fileName and eval it.
Read text from fileName and eval it.
This variable determines which constructor was used to create
this object and thereby affects the semantics of the
"getMessage" method (see below).
This field is used to access special tokens that occur prior to this
token, but after the immediately preceding regular (non-special) token.
Split class name into package and name
*
This file is part of the BeanShell Java Scripting distribution.
Swap in the value as the new top of the stack and return the old
value.
An attempt was made to use an unavailable capability supported by
an optional package.
Unassign the variable name.
Remove the variable from the namespace.
Unwrap primitive values and map voids to nulls.
Unwrap a variable to its value.
Misc utilities for the bsh.util package.
UtilEvalError is an error corresponding to an EvalError but thrown by a
utility or other class that does not have the caller context (Node)
available to it.
UtilTargetError is an error corresponding to a TargetError but thrown by a
utility or other class that does not have the caller context (Node)
available to it.