javax.management
Class StringValueExp

java.lang.Object
  extended by javax.management.StringValueExp
All Implemented Interfaces:
Serializable, ValueExp

public class StringValueExp
extends Object
implements ValueExp

Represents a string being used as an argument to a relational constraint.

Since:
1.5
See Also:
Serialized Form

Constructor Summary
StringValueExp()
          Constructs a new StringValueExp.
StringValueExp(String val)
          Constructs a new StringValueExp using the specified value.
 
Method Summary
 ValueExp apply(ObjectName name)
          Applies the StringValueExp to the specified management bean by simply returning the value.
 String getValue()
          Returns the value.
 void setMBeanServer(MBeanServer server)
          Sets the MBeanServer on which the query will be performed.
 String toString()
          Returns the value in quotes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringValueExp

public StringValueExp()
Constructs a new StringValueExp.


StringValueExp

public StringValueExp(String val)
Constructs a new StringValueExp using the specified value.

Parameters:
val - the string value used for this expression.
Method Detail

apply

public ValueExp apply(ObjectName name)
               throws BadStringOperationException,
                      BadBinaryOpValueExpException,
                      BadAttributeValueExpException,
                      InvalidApplicationException
Applies the StringValueExp to the specified management bean by simply returning the value.

Specified by:
apply in interface ValueExp
Parameters:
name - the ObjectName of the bean.
Returns:
the StringValueExp itself.
Throws:
BadStringOperationException - if an invalid string operation is used by the value expression.
BadBinaryOpValueExpException - if an invalid expression is used by the value expression.
BadAttributeValueExpException - if an invalid attribute is used by the value expression.
InvalidApplicationException - if the value expression is applied to the wrong type of bean.

getValue

public String getValue()
Returns the value.

Returns:
the value.

setMBeanServer

public void setMBeanServer(MBeanServer server)
Sets the MBeanServer on which the query will be performed.

Specified by:
setMBeanServer in interface ValueExp
Parameters:
server - the new server.

toString

public String toString()
Returns the value in quotes.

Overrides:
toString in class Object
Returns:
the value (quoted).
See Also:
Object.getClass(), Object.hashCode(), Class.getName(), Integer.toHexString(int)