java.lang.Objectjavax.naming.NameClassPair
public class NameClassPair
This class represents the object name and class name pair of a binding found in a context.
A context consists of name-to-object bindings. The NameClassPair class represents the name and the class of the bound object. It consists of a name and a string representing the package-qualified class name.
Use subclassing for naming systems that generate contents of a name/class pair dynamically.
A NameClassPair instance is not synchronized against concurrent access by multiple threads. Threads that need to access a NameClassPair concurrently should synchronize amongst themselves and provide the necessary locking.
Context.list(javax.naming.Name),
Serialized Form| Constructor Summary | |
|---|---|
NameClassPair(String name,
String className)
Constructs an instance of a NameClassPair given its name and class name. |
|
NameClassPair(String name,
String className,
boolean isRelative)
Constructs an instance of a NameClassPair given its name, class name, and whether it is relative to the listing context. |
|
| Method Summary | |
|---|---|
String |
getClassName()
Retrieves the class name of the object bound to the name of this binding. |
String |
getName()
Retrieves the name of this binding. |
String |
getNameInNamespace()
Retrieves the full name of this binding. |
boolean |
isRelative()
Determines whether the name of this binding is relative to the target context (which is named by the first parameter of the list() method). |
void |
setClassName(String name)
Sets the class name of this binding. |
void |
setName(String name)
Sets the name of this binding. |
void |
setNameInNamespace(String fullName)
Sets the full name of this binding. |
void |
setRelative(boolean r)
Sets whether the name of this binding is relative to the target context (which is named by the first parameter of the list()
method). |
String |
toString()
Generates the string representation of this name/class pair. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public NameClassPair(String name, String className)
name - The non-null name of the object. It is relative
to the target context (which is
named by the first parameter of the list() method)className - The possibly null class name of the object
bound to name. It is null if the object bound is null.getClassName(),
setClassName(java.lang.String),
getName(),
setName(java.lang.String)public NameClassPair(String name, String className, boolean isRelative)
name - The non-null name of the object.className - The possibly null class name of the object
bound to name. It is null if the object bound is null.isRelative - true if name is a name relative
to the target context (which is named by the first parameter
of the list() method); false if name
is a URL string.getClassName(),
setClassName(java.lang.String),
getName(),
setName(java.lang.String),
isRelative(),
setRelative(boolean)| Method Detail |
|---|
public String getClassName()
Binding.getObject(),
Binding.getClassName(),
setClassName(java.lang.String)public String getName()
isRelative(),
setName(java.lang.String)public void setName(String name)
name - the non-null string to use as the name.getName(),
setRelative(boolean)public void setClassName(String name)
name - the possibly null string to use as the class name.
If null, Binding.getClassName() will return
the actual class name of the object in the binding.
The class name will be null if the object bound is null.getClassName(),
Binding.getClassName()public boolean isRelative()
list() method).
setRelative(boolean),
getName()public void setRelative(boolean r)
list()
method).
r - If true, the name of binding is relative to the target context;
if false, the name of binding is a URL string.isRelative(),
setName(java.lang.String)public String getNameInNamespace()
Context.getNameInNamespace().
In naming systems for which the notion of full name does not apply to this binding an UnsupportedOperationException is thrown. This exception is also thrown when a service provider written before the introduction of the method is in use.
The string returned by this method is not a JNDI composite name and should not be passed directly to context methods.
UnsupportedOperationException - if the notion of full name
does not apply to this binding in the naming system.setNameInNamespace(java.lang.String),
getName()public void setNameInNamespace(String fullName)
Setting the full name to null, or not setting it at all, will cause getNameInNamespace() to throw an exception.
fullName - The full name to use.getNameInNamespace(),
setName(java.lang.String)public String toString()
Ces informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
La base de données est temporairement indisponible
Le site rencontre momentanément quelques problèmes...
La base de données est temporairement indisponible (), ce qui explique que de nombreuses fonctions ne soient temporairement pas accessibles (par exemple les liens de navigation, les sommaires, etc.) et que l'affichage des pages soit beaucoup plus lent.
Veuillez réessayer dans quelques minutes (les tests automatiques sont effectués toutes les 15 minutes).
Je vous présente mes excuses pour le désagrément que cela engendre.
Steph.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
Recherche (afficher)
Utilisateur (afficher)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)