Class NameModifierImpl

java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.NameModifierImpl
All Implemented Interfaces:
NameModifier

public class NameModifierImpl extends Object implements NameModifier
  • Field Details

    • prefix

      private String prefix
    • suffix

      private String suffix
  • Constructor Details

    • NameModifierImpl

      public NameModifierImpl()
    • NameModifierImpl

      public NameModifierImpl(String prefix, String suffix)
    • NameModifierImpl

      public NameModifierImpl(String pattern)
      Construct a NameModifier from a pattern of the form xxx%xxx. The pattern must consist of characters chosen from the set [A-Za-z0-9%$_]. In addition, the pattern must contain exactly one % character. Finally, if % is not the first char in the pattern, the pattern must not start with a number.

      The semantics of makeName are very simply: just replace the % character with the base in the pattern and return the result.

  • Method Details

    • invalidChar

      private boolean invalidChar(char ch, boolean isFirst)
      Return true if ch is invalid as a character in an identifier. If ch is a number, it is invalid only if isFirst is true.
    • makeName

      public String makeName(String base)
      Description copied from interface: NameModifier
      Create a modified name from the base name.
      Specified by:
      makeName in interface NameModifier