RSE
Release 3.4

org.eclipse.rse.ui
Class MassagerAddQuotes

java.lang.Object
  extended by org.eclipse.rse.ui.MassagerAddQuotes
All Implemented Interfaces:
ISystemMassager

public class MassagerAddQuotes
extends Object
implements ISystemMassager

This massager will take a string an add quotes to it by wrapping the string in the quote character and doubling any interior instances of the quote character.


Constructor Summary
MassagerAddQuotes()
          Construct a new instance of the massager.
MassagerAddQuotes(char quote)
          Construct a new instance of the massager.
 
Method Summary
 String massage(String text)
          Quotes the string by surround the original string with the quote character and doubling any internal occurences of the character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MassagerAddQuotes

public MassagerAddQuotes()
Construct a new instance of the massager. This instance assumes the quote character is the apostrophe '\''.


MassagerAddQuotes

public MassagerAddQuotes(char quote)
Construct a new instance of the massager. This instance uses the supplied character as the quoting character.

Parameters:
quote - the quote character to use in quoting strings
Method Detail

massage

public String massage(String text)
Quotes the string by surround the original string with the quote character and doubling any internal occurences of the character.

Specified by:
massage in interface ISystemMassager
Parameters:
text - the string to be quoted
Returns:
the quoted string
See Also:
ISystemMassager.massage(String)

RSE
Release 3.4

Copyright (c) IBM Corporation and others 2000, 2012. All Rights Reserved.