/** * @return the method that this lambda expression implements. * Must be defined as a non-default method in an interface, e.g. Consumer.accept(). */ @DerivedProperty <R> CtMethod<R> getOverriddenMethod();
/** * Returns true if it contains a final modifier (see {@link #hasModifier(ModifierKind)}) */ @DerivedProperty boolean isFinal();
/** * Inserts the given statement before a set of insertion points given by a * filter. */ @DerivedProperty <T extends CtStatementList> T insertBefore(Filter<? extends CtStatement> insertionPoints, CtStatement statement);
/** * Inserts the given statement after a set of insertion points given by a * filter. */ @DerivedProperty <T extends CtStatementList> T insertAfter(Filter<? extends CtStatement> insertionPoints, CtStatement statement);
/** * Gets the ith statement of this block. */ @DerivedProperty <T extends CtStatement> T getStatement(int i);
/** * Returns true if this has the default bounding type that is java.lang.Object (which basically means that there is no bound) */ @DerivedProperty boolean isDefaultBoundingType(); }
/** * Returns the number of dimensions of this array type. This corresponds to * the number of array types recursively embedded into the current one (see * {@link #getComponentType()}). */ @DerivedProperty int getDimensionCount();
/** * Returns the fully qualified name of type followed by `.*` */ @DerivedProperty String getSimpleName();
/** * Returns the element which is annotated by this annotation. * * @return annotated {@link spoon.reflect.declaration.CtElement} */ @DerivedProperty // the annotation is contained by the element not the other way around CtElement getAnnotatedElement();
/** * Returns the type of the element which is annotated by this annotation. * * @return {@link spoon.reflect.declaration.CtAnnotatedElementType} */ @DerivedProperty CtAnnotatedElementType getAnnotatedElementType();
/** * Gets the declaring module. */ @DerivedProperty CtModule getDeclaringModule();
/** * @return true if the element is annotated by the given annotation type. * * @param annotationType * the annotation type */ @DerivedProperty <A extends Annotation> boolean hasAnnotation(Class<A> annotationType);
/** * Calculates and returns the set of all the types referenced by this * element (and sub-elements in the AST). */ @DerivedProperty Set<CtTypeReference<?>> getReferencedTypes();
/** * Gets the parent of current reference. * * @throws ParentNotInitializedException * when the parent of this element is not initialized */ @DerivedProperty CtElement getParent() throws ParentNotInitializedException;
/** * Useful proxy to {@link #getDefaultExpression()}. */ @Override @DerivedProperty CtExpression<T> getAssignment();
/** * Gets the declared package */ @DerivedProperty CtPackage getDeclaredPackage();
/** * Returns the kind of import (see {@link CtImportKind}) */ @DerivedProperty CtImportKind getImportKind();
/** * * NEVER USE THIS. * * See {@link CtTypeReference#getActualClass()}. * * @deprecated (since Spoon 7.0.0) this will be removed from the public API */ @DerivedProperty Class<T> getActualClass();
/** * Delegate to the executable reference of the invocation. * * @see CtExecutableReference#getActualTypeArguments() */ @Override @DerivedProperty @PropertyGetter(role = TYPE_ARGUMENT) List<CtTypeReference<?>> getActualTypeArguments();
/** * Returns the constructors of this class. This includes the default * constructor if this class has no constructors explicitly declared. * * Derived from {@link #getTypeMembers()} */ @DerivedProperty @PropertyGetter(role = CONSTRUCTOR) Set<CtConstructor<T>> getConstructors();