|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.autosemantix.NameValidator
This class is responsible for defining which names are valid class and attribute names in Java. If an invlid name is detected, this class can convert it to an acceptable one which is still easily identifiable and easy to read.
Constructor Summary | |
NameValidator()
|
Method Summary | |
static java.lang.String |
getGetterMethodName(EStructuralFeature feature)
Get an appropriate getter method name for the given attribute. |
static java.lang.String |
getSetterMethodName(EStructuralFeature feature)
Get an appropriate setter method name for the given attribute. |
static java.lang.String |
getValidAttributeName(java.lang.String name)
Converts an invalid attribute name to a valid one. |
static java.lang.String |
getValidClassName(java.lang.String name)
Converts an invalid class name to a valid one. |
static boolean |
isValid(java.lang.String name)
Validates names to determine whether they are valid Java class or attribute names. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NameValidator()
Method Detail |
public static java.lang.String getGetterMethodName(EStructuralFeature feature)
feature
- The attribute to be accessed by the getter method.
public static java.lang.String getSetterMethodName(EStructuralFeature feature)
feature
- The attribute to be modified by the setter method.
public static boolean isValid(java.lang.String name)
name
- The name to be validated.
NameValidator#validate(String)
public static java.lang.String getValidAttributeName(java.lang.String name)
name
- The invalid name.
isValid(String)
public static java.lang.String getValidClassName(java.lang.String name)
name
- The invalid name.
isValid(String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |