Class NameModifierImpl
java.lang.Object
com.sun.tools.corba.ee.idl.toJavaPortable.NameModifierImpl
- All Implemented Interfaces:
NameModifier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionNameModifierImpl
(String pattern) Construct a NameModifier from a pattern of the form xxx%xxx.NameModifierImpl
(String prefix, String suffix) -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
invalidChar
(char ch, boolean isFirst) Return true if ch is invalid as a character in an identifier.Create a modified name from the base name.
-
Field Details
-
prefix
-
suffix
-
-
Constructor Details
-
NameModifierImpl
public NameModifierImpl() -
NameModifierImpl
-
NameModifierImpl
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
Description copied from interface:NameModifier
Create a modified name from the base name.- Specified by:
makeName
in interfaceNameModifier
-