Merge pull request #50 from kno10/patch-4

Avoid repeated lowercasing
This commit is contained in:
Diomidis Spinellis 2018-08-14 14:32:09 +03:00 committed by GitHub
commit 132f389bcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}
}