[ClavaWeaver] $jp.getValue() now detects if a key is supported or not
@@ -1105,10 +1105,16 @@ public abstract class ACxxWeaverJoinPoint extends AJoinPoint {
@Override
public Object getValueImpl(String key) {
+ var keys = getNode().getKeys();
+ if (!keys.hasKey(key)) {
+ ClavaLog.info("getValue(): key '" + key + "' not supported for join point '" + getJoinPointType() + "'");
+ return null;
+ }
+
// Get key
- DataKey<?> datakey = getNode().getKeys().getKey(key);
+ DataKey<?> datakey = keys.getKey(key);
- Object value = getNode().get(datakey);
+ var value = getNode().get(datakey);
return CxxAttributes.adaptValue(value);
}
