Avoid repeated lowercasing

This commit is contained in:
Erich Schubert 2018-03-28 16:03:15 +02:00
parent 40b5a687cc
commit 021dc34d8e
2 changed files with 8 additions and 2 deletions

View File

@ -623,7 +623,7 @@ class ClassGraph {
* @param edgetype the dot edge specification
*/
private void allRelation(Options opt, RelationType rt, ClassDoc from) {
String tagname = rt.toString().toLowerCase();
String tagname = rt.lower;
for (Tag tag : from.tags(tagname)) {
String t[] = StringUtil.tokenize(tag.text()); // l-src label l-dst target
if (t.length != 4) {

View File

@ -6,5 +6,11 @@ package org.umlgraph.doclet;
*
*/
public enum RelationType {
ASSOC, NAVASSOC, HAS, NAVHAS, COMPOSED, NAVCOMPOSED, DEPEND, EXTENDS, IMPLEMENTS;
ASSOC(), NAVASSOC(), HAS(), NAVHAS(), COMPOSED(), NAVCOMPOSED(), DEPEND(), EXTENDS(), IMPLEMENTS();
public final String lower;
private RelationType() {
this.lower = toString().toLowerCase();
}
}