pmp.macro.str
Class UpperCase

java.lang.Object
  extended by pmp.AbstractMacro
      extended by pmp.macro.str.UpperCase

public class UpperCase
extends AbstractMacro

Converts parameter to upper case.

Title: PMP: Macroprocessor

Description: Java macroprocessor

Copyright: Copyright (c) 2005

Version:
1.0
Author:
Luděk Hlaváček
To Do:
modes !!!

Field Summary
static int PARAMS_REQUIRED
           
static java.lang.String UC_ALL
          Change all letters to upper case.
static java.lang.String UC_ASCII
          Ignore locale settings and modify only ASCII characters [a-zA-Z].
static java.lang.String UC_FIRST
          Change only the first letter to upper case.
static java.lang.String UC_WORDS
          Change to upper case only the first letters in words.
 
Constructor Summary
UpperCase()
           
 
Method Summary
 java.lang.String run(Macroprocessor mp, java.lang.String[] params)
          Main method of macro.
 
Methods inherited from class pmp.AbstractMacro
getRequiredParams, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PARAMS_REQUIRED

public static final int PARAMS_REQUIRED
See Also:
Constant Field Values

UC_ASCII

public static final java.lang.String UC_ASCII
Ignore locale settings and modify only ASCII characters [a-zA-Z].

See Also:
Constant Field Values

UC_ALL

public static final java.lang.String UC_ALL
Change all letters to upper case. This is default mode.

See Also:
Constant Field Values

UC_WORDS

public static final java.lang.String UC_WORDS
Change to upper case only the first letters in words.

See Also:
Constant Field Values

UC_FIRST

public static final java.lang.String UC_FIRST
Change only the first letter to upper case.

See Also:
Constant Field Values
Constructor Detail

UpperCase

public UpperCase()
Method Detail

run

public java.lang.String run(Macroprocessor mp,
                            java.lang.String[] params)
Description copied from class: AbstractMacro
Main method of macro. This method is called when this macro is invoked. All subclasses must imlement this method

Specified by:
run in class AbstractMacro
Parameters:
mp - reference to Macroprocessor
params - parameters of macro. In args[0] is stored name of macro. Subclasses are free to modify this array.
Returns:
result of the macro as String