Interface CtParameter<T>

    • Method Detail

      • getParent

        CtExecutable<?> getParent()
        Gets the executable that is the parent declaration of this parameter declaration. (Overriding the return type)
        Specified by:
        getParent in interface CtElement
      • isVarArgs

        boolean isVarArgs()
        Returns true if this parameter accepts a variable number of arguments (must be the last parameter of CtExecutable.getParameters()).
      • setVarArgs

        <C extends CtParameter<T>> C setVarArgs​(boolean varArgs)
        Sets this parameter to have varargs.
      • clone

        CtParameter<T> 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 CtElement
        Specified by:
        clone in interface CtNamedElement
      • isInferred

        boolean isInferred()
        Returns true if this parameter is a lambda parameter with type defined using the `var` keyword (since Java 11).
      • setInferred

        <U extends CtParameter<T>> U setInferred​(boolean inferred)
        Set to true if this parameter is a lambda parameter with type defined using the `var` keyword. Warning: this method should only be used if compliance level is set to 11 or more.