Package com.blackbuild.klum.ast.runtime
Class BuilderVisitingPhaseAction
java.lang.Object
com.blackbuild.klum.ast.runtime.internal.process.AbstractPhaseAction
com.blackbuild.klum.ast.runtime.BuilderVisitingPhaseAction
- All Implemented Interfaces:
ModelVisitor,PhaseAction
- Direct Known Subclasses:
AutoCreationPhase,AutoLinkPhase,DefaultPhase,EarlyValidationPhase,OwnerPhase,PostTreePhase
public abstract class BuilderVisitingPhaseAction
extends AbstractPhaseAction
implements ModelVisitor
Visits mutable Builders before
DefaultKlumPhase.INSTANTIATE.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blackbuild.klum.ast.runtime.internal.layer3.ModelVisitor
ModelVisitor.Action -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected abstract voiddoVisit(@NotNull String path, @NotNull InternalKlumBuilder<?> builder, @Nullable Object container, @Nullable String nameOfFieldInContainer) shouldVisit(@NotNull String path, @NotNull Object element, @Nullable Object container, @Nullable String nameOfFieldInContainer) Checks whether the given element should be visited.final voidvisit(@NotNull String path, @NotNull Object element, @Nullable Object container, @Nullable String nameOfFieldInContainer) Visit the given element.protected voidwithCurrentTemplates(InternalKlumBuilder<?> builder, Runnable runnable) Methods inherited from class com.blackbuild.klum.ast.runtime.internal.process.AbstractPhaseAction
execute, getPhase, isEmpty, isSet, isUnset, replaceRootObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.blackbuild.klum.ast.runtime.PhaseAction
getPhaseNumber, getSkipProperty, shouldSkip
-
Constructor Details
-
BuilderVisitingPhaseAction
-
-
Method Details
-
doExecute
protected void doExecute()- Specified by:
doExecutein classAbstractPhaseAction
-
shouldVisit
public ModelVisitor.Action shouldVisit(@NotNull @NotNull String path, @NotNull @NotNull Object element, @Nullable @Nullable Object container, @Nullable @Nullable String nameOfFieldInContainer) Description copied from interface:ModelVisitorChecks whether the given element should be visited. The defautlt implementation is to only handle DSL objects.- Specified by:
shouldVisitin interfaceModelVisitor- Parameters:
path- a string (GSON-like) representation of the path from the root to this elementelement- the element to visitcontainer- The object containing this element. If the element is a member of a collection or map, the object containing the collection or map.nameOfFieldInContainer- The name of the field in the container pointing to this object (or its collection/map- Returns:
- whether to skip, visit or skip subtree
-
visit
public final void visit(@NotNull @NotNull String path, @NotNull @NotNull Object element, @Nullable @Nullable Object container, @Nullable @Nullable String nameOfFieldInContainer) Description copied from interface:ModelVisitorVisit the given element.- Specified by:
visitin interfaceModelVisitor- Parameters:
path- a string (GSON-like) representation of the path from the root to this elementelement- the element to visitcontainer- The object containing this element. If the element is a member of a collection or map, the object containing the collection or map.nameOfFieldInContainer- The name of the field in the container pointing to this object (or its collection/map
-
doVisit
protected abstract void doVisit(@NotNull @NotNull String path, @NotNull @NotNull InternalKlumBuilder<?> builder, @Nullable @Nullable Object container, @Nullable @Nullable String nameOfFieldInContainer) -
withCurrentTemplates
-