[ClavaWeaver] Makes join point type attribute use JoinPoint method
@@ -44,7 +44,7 @@ public abstract class ACxxWeaverJoinPoint extends AJoinPoint {
@Override
public CxxWeaver getWeaverEngine() {
- return (CxxWeaver) super.getWeaverEngine();
+ return super.getWeaverEngine();
}
/**
@@ -70,7 +70,7 @@ public abstract class ACxxWeaverJoinPoint extends AJoinPoint {
*/
@Override
public boolean compareNodes(AJoinPoint aJoinPoint) {
- return this.getNode().equals(aJoinPoint.getNode());
+ return getNode().equals(aJoinPoint.getNode());
}
@Override
@@ -155,7 +155,7 @@ public abstract class ACxxWeaverJoinPoint extends AJoinPoint {
public AJoinPoint astAncestorImpl(String type) {
Preconditions.checkNotNull(type, "Missing type of ancestor in attribute 'astAncestor'");
- ClavaNode currentNode = this.getNode();
+ ClavaNode currentNode = getNode();
while (currentNode.hasParent()) {
ClavaNode parentNode = currentNode.getParent();
@@ -208,17 +208,18 @@ public abstract class ACxxWeaverJoinPoint extends AJoinPoint {
@Override
public String getJoinpointTypeImpl() {
// return getNode().getClass().getSimpleName();
- String joinpointName = getClass().getSimpleName();
-
- // Remove 'CXX' prefix
- if (joinpointName.startsWith("Cxx")) {
- joinpointName = joinpointName.substring("Cxx".length());
- }
-
- // Make first character lowercase
- char lowerFirstChar = Character.toLowerCase(joinpointName.charAt(0));
-
- return lowerFirstChar + joinpointName.substring(1);
+ return getJoinPointType();
+ // String joinpointName = getClass().getSimpleName();
+ //
+ // // Remove 'CXX' prefix
+ // if (joinpointName.startsWith("Cxx")) {
+ // joinpointName = joinpointName.substring("Cxx".length());
+ // }
+ //
+ // // Make first character lowercase
+ // char lowerFirstChar = Character.toLowerCase(joinpointName.charAt(0));
+ //
+ // return lowerFirstChar + joinpointName.substring(1);
}
@Override
