Class CtDoImpl

All Implemented Interfaces:
Serializable, Cloneable, FactoryAccessor, CtBodyHolder, CtCodeElement, CtDo, CtLoop, CtStatement, SourcePositionHolder, CtElement, CtQueryable, CtVisitable, TemplateParameter<Void>

public class CtDoImpl extends CtLoopImpl implements CtDo
See Also:
  • Constructor Details

    • CtDoImpl

      public CtDoImpl()
  • Method Details

    • accept

      public void accept(CtVisitor visitor)
      Description copied from interface: CtVisitable
      Accepts a visitor
      Specified by:
      accept in interface CtVisitable
    • getLoopingExpression

      public CtExpression<Boolean> getLoopingExpression()
      Description copied from interface: CtDo
      Returns the looping test as a boolean expression.
      Specified by:
      getLoopingExpression in interface CtDo
    • setLoopingExpression

      public <T extends CtDo> T setLoopingExpression(CtExpression<Boolean> expression)
      Description copied from interface: CtDo
      Sets the looping test as a boolean expression.
      Specified by:
      setLoopingExpression in interface CtDo
    • clone

      public CtDo clone()
      Description copied from interface: CtElement
      Clone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methods Refactoring.copyType(CtType) and Refactoring.copyMethod(CtMethod) instead which does additional work beyond cloning.
      Specified by:
      clone in interface CtCodeElement
      Specified by:
      clone in interface CtDo
      Specified by:
      clone in interface CtElement
      Specified by:
      clone in interface CtLoop
      Specified by:
      clone in interface CtStatement
      Overrides:
      clone in class CtLoopImpl
      Returns:
      a clone of this element. All children are cloned, but the parent of the returned clone is set to null.