Class CtThrowImpl

All Implemented Interfaces:
Serializable, Cloneable, FactoryAccessor, CtCFlowBreak, CtCodeElement, CtStatement, CtThrow, SourcePositionHolder, CtElement, CtQueryable, CtVisitable, TemplateParameter<Void>

public class CtThrowImpl extends CtStatementImpl implements CtThrow
See Also:
  • Constructor Details

    • CtThrowImpl

      public CtThrowImpl()
  • Method Details

    • accept

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

      public CtExpression<? extends Throwable> getThrownExpression()
      Description copied from interface: CtThrow
      Returns the thrown expression (must be a throwable).
      Specified by:
      getThrownExpression in interface CtThrow
    • setThrownExpression

      public <T extends CtThrow> T setThrownExpression(CtExpression<? extends Throwable> expression)
      Description copied from interface: CtThrow
      Sets the thrown expression (must be a throwable).
      Specified by:
      setThrownExpression in interface CtThrow
    • clone

      public CtThrow 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 CtElement
      Specified by:
      clone in interface CtStatement
      Specified by:
      clone in interface CtThrow
      Overrides:
      clone in class CtStatementImpl
      Returns:
      a clone of this element. All children are cloned, but the parent of the returned clone is set to null.
    • S

      public Void S()
      Description copied from interface: TemplateParameter
      Gets the type of the template parameter. This methods has no runtime meaning (should return a null reference) but is used as a marker in a template code.
      Specified by:
      S in interface TemplateParameter<Void>
    • getSubstitution

      public CtCodeElement getSubstitution(CtType<?> targetType)