tClass
}
/**
- * Creates a {@link PatternModification} that adds the {@link MatchProperty} to a {@link NodePattern} that a specific attribute of a matching {@link Node} must be equal to the same attribute of another {@link Node}.
- *
+ * Creates a {@link PatternModification} that adds the {@link MatchProperty} to a {@link NodePattern} that a specific
+ * attribute of a matching {@link Node} must be equal to the same attribute of another {@link Node}.
* @param propertyEdge the property edge
- * @param otherId the identifier of the other {@link NodePattern}
- * @param the {@link Node} type
- * @param the attribute type
+ * @param otherId the identifier of the other {@link NodePattern}
+ * @param the {@link Node} type
+ * @param
the attribute type
* @return the {@link PatternModification}
*/
public static PatternModification equalAttributes(CpgPropertyEdge propertyEdge, String otherId) {
@@ -59,11 +59,11 @@ public static PatternModification equalAttributes(CpgProp
}
/**
- * Creates a {@link PatternModification} that adds the {@link MatchProperty} to a {@link NodePattern} that the assigned value is unchanged between the evaluation of the two given {@link Node}s.
- *
+ * Creates a {@link PatternModification} that adds the {@link MatchProperty} to a {@link NodePattern} that the assigned
+ * value is unchanged between the evaluation of the two given {@link Node}s.
* @param startId the identifier of the starting node id
- * @param endId the identifier of the end node id
- * @param the type of
+ * @param endId the identifier of the end node id
+ * @param the type of
* @return the {@link PatternModification}
*/
public static PatternModification assignedValueStableBetween(String startId, String endId) {
@@ -77,18 +77,16 @@ public static PatternModification notEqualTo(String otherId)
/**
* Builds a {@link SimpleGraphPattern}. The specifics of the structure of the SimpleGraphPattern are defined in the
* concrete subclasses of {@link GraphPatternBuilder}.
- *
* @return the graph pattern
*/
public abstract GraphPattern build();
/**
* Convenience method to create a {@link NodePattern}.
- *
- * @param tClass the {@link Node} class of the pattern
- * @param id the ID for the pattern
+ * @param tClass the {@link Node} class of the pattern
+ * @param id the ID for the pattern
* @param modifications a list of modifications to the {@link NodePattern}
- * @param the node type
+ * @param the node type
* @return the node pattern
*/
@SafeVarargs
@@ -105,8 +103,8 @@ public final SimpleGraphPattern create(Class tClass, Stri
}
/**
- * Creates an empty {@link WildcardGraphPattern}. It can be used as a target pattern for a {@link de.jplag.java_cpg.transformation.GraphTransformation} where a {@link Node} shall be removed.
- *
+ * Creates an empty {@link WildcardGraphPattern}. It can be used as a target pattern for a
+ * {@link de.jplag.java_cpg.transformation.GraphTransformation} where a {@link Node} shall be removed.
* @return the wildcard graph pattern
*/
protected SimpleGraphPattern emptyWildcardParent() {
@@ -126,15 +124,14 @@ protected SimpleGraphPattern emptyWildcardParent() {
*/
@SafeVarargs
public final PatternModification forAllRelated(CpgMultiEdge multiEdge, Class cClass,
- String id, PatternModification super C>... modifications) {
+ String id, PatternModification super C>... modifications) {
return new AddForAllRelated<>(multiEdge, cClass, id, Arrays.asList(modifications));
}
/**
* Creates a {@link MultiGraphPattern} from the given {@link SimpleGraphPattern}s.
- *
- * @param subgraphs
- * @return
+ * @param subgraphs the subgraph patterns
+ * @return the multi graph pattern
*/
public final MultiGraphPattern multiRoot(SimpleGraphPattern>... subgraphs) {
return new MultiGraphPattern(List.of(subgraphs), patterns);
@@ -143,7 +140,6 @@ public final MultiGraphPattern multiRoot(SimpleGraphPattern>... subgraphs) {
/**
* Creates a {@link PatternListModification} that adds a {@link NodePattern} to a {@link NodeListPattern}.
* @param cClass the concrete class of the added NodePattern
- * @param tClass the added node class as defined by the AST edge to the parent
* @param id the identifier for the node pattern
* @param modifications the modifications to be applied to the node
* @return the pattern list modification
@@ -151,16 +147,14 @@ public final MultiGraphPattern multiRoot(SimpleGraphPattern>... subgraphs) {
* @param the concrete type of the added node
*/
@SafeVarargs
- public final PatternListModification node(Class cClass, Class tClass, String id,
- PatternModification... modifications) {
- return new AddNode<>(cClass, tClass, id, Arrays.asList(modifications));
+ public final PatternListModification node(Class cClass, String id, PatternModification... modifications) {
+ return new AddNode<>(cClass, id, Arrays.asList(modifications));
}
/**
* Creates a {@link PatternModification} to add a property to a {@link NodePattern}.
- *
* @param property the predicate establishing the property
- * @param the target {@link Node} type
+ * @param the target {@link Node} type
* @return the pattern modification
*/
public final PatternModification property(Predicate property) {
@@ -168,97 +162,90 @@ public final PatternModification property(Predicate prope
}
/**
-
- * Creates a {@link PatternModification} that adds a new node pattern that is related to the reference node pattern
- * via a 1:n relation.
- *
- * @param edge the edge type connecting the node patterns
- * @param rClass the class object indicating the specified target's class type
- * @param id the name of the new related node pattern
+ * Creates a {@link PatternModification} that adds a new node pattern that is related to the reference node pattern via
+ * a 1:n relation.
+ * @param edge the edge type connecting the node patterns
+ * @param rClass the class object indicating the specified target's class type
+ * @param id the name of the new related node pattern
* @param modifications a list of modifications targeting the new node pattern
- * @param the type of the source node pattern
- * @param the type of the relation target, defined by the edge
- * @param the concrete type of the related node pattern
+ * @param the type of the source node pattern
+ * @param the type of the relation target, defined by the edge
+ * @param the concrete type of the related node pattern
* @return the pattern modification object
*/
@SafeVarargs
public final PatternModification related(CpgEdge edge, Class rClass, String id,
- PatternModification super C>... modifications) {
+ PatternModification super C>... modifications) {
return new AddRelatedNode<>(edge, rClass, id, Arrays.asList(modifications));
}
/**
- * Creates a {@link PatternModification} that adds a new node pattern that is related to the reference node pattern
- * via a 1:n relation.
- *
- * @param edge the edge type connecting the node patterns
- * @param rClass the class object indicating the specified target's class type
- * @param id the name of the new related node pattern
+ * Creates a {@link PatternModification} that adds a new node pattern that is related to the reference node pattern via
+ * a 1:n relation.
+ * @param edge the edge type connecting the node patterns
+ * @param rClass the class object indicating the specified target's class type
+ * @param id the name of the new related node pattern
* @param modifications a list of modifications targeting the new node pattern
- * @param the type of the source node pattern
- * @param the type of the relation target, defined by the edge
- * @param the concrete type of the related node pattern
+ * @param the type of the source node pattern
+ * @param the type of the relation target, defined by the edge
+ * @param the concrete type of the related node pattern
* @return the pattern modification object
*/
@SafeVarargs
public final PatternModification related1ToN(CpgMultiEdge edge, Class rClass, String id,
- PatternModification super C>... modifications) {
+ PatternModification super C>... modifications) {
return new AddRelated1ToNNode<>(edge, rClass, id, Arrays.asList(modifications));
}
/**
* Creates a {@link PatternModification} to add a sequence of related node pattern to a {@link NodePattern}.
- *
- * @param edge the multi-edge establishing the relation
+ * @param edge the multi-edge establishing the relation
* @param cClass the (super)type class of the related nodes
- * @param the source {@link Node} type
- * @param the target {@link Node} type
+ * @param the source {@link Node} type
+ * @param the target {@link Node} type
* @return the pattern modification
*/
@SafeVarargs
public final PatternModification related1ToNSequence(CpgMultiEdge edge, Class cClass,
- PatternListModification