package javax.naming;
public class Binding extends NameClassPair
{
public Binding (String name, Object obj)
{
super (name, null);
boundObj = obj;
}
public Binding (String name, Object obj, boolean isRelative)
{
super (name, null, isRelative);
boundObj = obj;
}
public Binding (String name, String className, Object obj)
{
super (name, className);
boundObj = obj;
}
public Binding (String name, String className, Object obj,
boolean isRelative)
{
super (name, className, isRelative);
boundObj = obj;
}
public String getClassName ()
{
String r = super.getClassName ();
if (r != null)
return r;
return boundObj == null ? null : boundObj.getClass ().getName ();
}
public Object getObject ()
{
return boundObj;
}
public void setObject (Object obj)
{
boundObj = obj;
}
public String toString ()
{
return super.toString () + ":" + boundObj.toString ();
}
private Object boundObj;
}