| java.lang.Object gnu.mapping.Symbol
All known Subclasses: gnu.xml.XName, gnu.expr.Keyword,
Symbol | public class Symbol implements EnvironmentKey,Comparable,Externalizable(Code) | | A Symbol is a name, usually in a specific Namespace.
A Symbol is stateless: Comon Lisp-style "value", "function" and
"property list" bindings are not part of the Symbol itself, but
looked up in the current Environment.
A Symbol may be viewed as an EnvironmentKey
with a null property component.
|
FUNCTION | final public static Symbol FUNCTION(Code) | | Conventional value used as a property key for function bindings.
|
PLIST | final public static Symbol PLIST(Code) | | Conventional value used as a Symbol name to
access an Object 's property list.
A property list is a list with a even number of
Pair s, containing alternating keys and values.
They are used in Common Lisp and Emacs Lisp.
Kawa (following XEmacs) allows arbitrary objects to have property lists,
thus the PLIST as used as the name and the object as the property.
(In the future we'll do somethingg clever so that get(SYMBOL, KEY)
as the same as getf(get(PLIST, SYMBOL), KEY) - but much faster.)
|
Symbol | public Symbol(Namespace ns, String name)(Code) | | Create new Symbol in a given namespace.
Does not enter the result in the namespace's symbol table.
Parameters: name - an interned String |
equals | final public boolean equals(Object o)(Code) | | Just tests for identity.
Otherwise hashTables that have Symbols as keys will break.
|
getLocalName | final public String getLocalName()(Code) | | Synonym for getName - the "print name" of the symbol without Namespace.
Useful when thinking of a Symbol as an XML QName.
|
hasEmptyNamespace | final public boolean hasEmptyNamespace()(Code) | | |
hashCode | public int hashCode()(Code) | | |
make | public static Symbol make(String uri, String name, String prefix)(Code) | | Find or create a symbol in a specificed namespace.
Parameters: uri - a namespace uri. Parameters: name - The "local name" or "print name" of the desired symbol. Parameters: prefix - namespace prefix, or "" |
make | public static Symbol make(Object namespace, String name)(Code) | | Find or create a symbol in a specificed namespace.
Parameters: namespace - can be an Namespace, or a namespace/environment name(resolved using Namespace.getInstance), or null (in which casean uninterned symbol is created). Parameters: name - The "local name" or "print name" of the desired symbol. |
makeWithUnknownNamespace | public static Symbol makeWithUnknownNamespace(String local, String prefix)(Code) | | Make a placeholder symbol with a known prefix and unknown namespace-uri.
This is convenient for processing definition commands like
"prefix:name=value" - such as on the Kawa command-line -
where we don't yet know the namespace-uri. Code that later looks
for a value should look both under the true namespace-uri and
less LOG.JA * using this method (or
Namespace.makeUnknownNamespace ).
|
|
|