Package dk.mada.jaxrs.model.naming
Class Identifiers
java.lang.Object
dk.mada.jaxrs.model.naming.Identifiers
Make identifiers valid for java.
https://docs.oracle.com/javase/specs/jls/se7/html/jls-3.html#jls-3.8
A dash causes the following char to be upper-cased (foo-bar becomes fooBar). A group of upper-cased chars will be
lower cased (FOOBar becomes fooBar).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionmakeValidEdgeTypeName
(String input) Make a valid type name for java, down-casing on edges.makeValidEdgeVariableName
(String input) Make a valid variable name for java, down-casing on edges.makeValidTypeName
(String input) Make a valid type name for java.makeValidVariableName
(String input) Make a valid variable name for java.
-
Constructor Details
-
Identifiers
public Identifiers()
-
-
Method Details
-
makeValidVariableName
Make a valid variable name for java. The initial character is lower-case. Example: FOOBar becomes fOOBar, fooBAR becomes fooBAR- Parameters:
input
- the name- Returns:
- a valid variable name
-
makeValidEdgeVariableName
Make a valid variable name for java, down-casing on edges. The initial character is lower-case. Example: FOOBar becomes fooBar, fooBAR becomes fooBar- Parameters:
input
- the name- Returns:
- a valid variable name
-
makeValidTypeName
Make a valid type name for java. The initial character is upper-case. Example: FOOBar becomes FOOBar, fooBAR becomes FooBAR- Parameters:
input
- the name- Returns:
- a valid type name
-
makeValidEdgeTypeName
Make a valid type name for java, down-casing on edges. The initial character is upper-case. Example: FOOBar becomes FooBar, fooBAR becomes FooBar- Parameters:
input
- the name- Returns:
- a valid type name
-