java类库详细讲解
源代码在线查看: fullname.html
Getting an Object's Fully Qualified Name
(Java Developers Almanac Example)
BODY CODE {font-family: Courier, Monospace; font-size: 11pt} TABLE, BODY {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt} PRE {font-family: Courier, Monospace; font-size: 10pt} H3 {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11pt} A.eglink {text-decoration: none} A:hover.eglink {text-decoration: underline} -->
The Java Developers Almanac 1.4
Order this book from Amazon.
Home
>
List of Packages
>
javax.naming
[9 examples]
e477.
Getting an Object's Fully Qualified Name
This example gets an object's fully qualified name in its own namespace.
try {
Context obj = (Context)childCtx.lookup("grandChild");
String fullname = obj.getNameInNamespace();
} catch (NamingException e) {
}
Related Examples
e472.
Creating an Initial Context to the Naming Service
e473.
Looking Up an Object from the Naming Service
e474.
Listing a Context in the Naming Service
e475.
Adding, Replacing, Removing, and Renaming a Binding in the Naming Service
e476.
Creating and Destroying a Subcontext in the Naming Service
e478.
Using a URL as a Name to the Initial Context
e479.
Parsing a JNDI Composite Name
e480.
Parsing a JNDI Compound Name
© 2002 Addison-Wesley.