Class ComponentTracker
- java.lang.Object
-
- com.vaadin.flow.component.internal.ComponentTracker
-
public class ComponentTracker extends Object
Tracks the location in source code where components were instantiated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classComponentTracker.LocationRepresents a location in the source code.
-
Constructor Summary
Constructors Constructor Description ComponentTracker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ComponentTracker.LocationfindAttach(Component component)Finds the location where the given component instance was attached to a parent.static ComponentTracker.LocationfindCreate(Component component)Finds the location where the given component instance was created.static voidtrackAttach(Component component)Tracks the location where the component was attached.static voidtrackCreate(Component component)Tracks the location where the component was created.
-
-
-
Method Detail
-
findCreate
public static ComponentTracker.Location findCreate(Component component)
Finds the location where the given component instance was created.- Parameters:
component- the component to find- Returns:
- the location where the component was created
-
trackCreate
public static void trackCreate(Component component)
Tracks the location where the component was created. This should be called from the Component constructor so that the creation location can be found from the current stacktrace.- Parameters:
component- the component to track
-
findAttach
public static ComponentTracker.Location findAttach(Component component)
Finds the location where the given component instance was attached to a parent.- Parameters:
component- the component to find- Returns:
- the location where the component was attached
-
trackAttach
public static void trackAttach(Component component)
Tracks the location where the component was attached. This should be called from the Component attach logic so that the creation location can be found from the current stacktrace.- Parameters:
component- the component to track
-
-