Commit 571686f9 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

[WIP] further reflection statements were removed

parent fd2924ab
Pipeline #59479 passed with stage
in 46 seconds
......@@ -184,8 +184,8 @@ public class ScenarioElementView extends JPanel implements ISelectScenarioElemen
} else if (scenarioElement instanceof Pedestrian) {
} else {
......@@ -31,8 +31,11 @@ public class ReflectionAttributeModifier {
double y = shape.getBounds2D().getCenterY();
((AgentWrapper) element).getAgentInitialStore().setPosition(new VPoint(x, y));
} else {
Attributes attributes =
Attributes attributes = element.getAttributes(); // replaces Relection code from above
//TODO: issue #91 Cannot easily replace the relection in the following code. Some Attributes classes have a
//TODO: setShape(shape) method such as AttributesStairs, but not all, so there is no guarantee...
//TODO: If there is no field "shape", then only the stacktrace is printed...
field = attributes.getClass().getDeclaredField("shape");
field.set(attributes, shape);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment