Skip to content

Commit

Permalink
Add getNonQualifiedClassName() abstract method
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Dec 15, 2024
1 parent 083e9e6 commit af0be77
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/gr/uom/java/xmi/UMLInitializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public String getElementType() {
return "initializer";
}

@Override
public String getNonQualifiedClassName() {
return className.contains(".") ? className.substring(className.lastIndexOf(".")+1, className.length()) : className;
}

@Override
public String getClassName() {
return className;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ default boolean equalReturnParameter(VariableDeclarationContainer operation) {
String getName();
String getElementType();
String getClassName();
String getNonQualifiedClassName();
String toQualifiedString();
Map<String, Set<VariableDeclaration>> variableDeclarationMap();
UMLAnonymousClass findAnonymousClass(AnonymousClassDeclarationObject anonymousClassDeclaration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ public String getElementType() {
return "lambda";
}

@Override
public String getNonQualifiedClassName() {
if(owner != null) {
String className = owner.getClassName();
return className.contains(".") ? className.substring(className.lastIndexOf(".")+1, className.length()) : className;
}
return null;
}

@Override
public String getClassName() {
if(owner != null) {
Expand Down

0 comments on commit af0be77

Please sign in to comment.