-
-
Notifications
You must be signed in to change notification settings - Fork 342
/
CtAnnotationMethod.java
64 lines (53 loc) · 2 KB
/
CtAnnotationMethod.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* SPDX-License-Identifier: (MIT OR CECILL-C)
*
* Copyright (C) 2006-2023 INRIA and contributors
*
* Spoon is available either under the terms of the MIT License (see LICENSE-MIT.txt) or the Cecill-C License (see LICENSE-CECILL-C.txt). You as the user are entitled to choose the terms under which to adopt Spoon.
*/
package spoon.reflect.declaration;
import org.jspecify.annotations.Nullable;
import spoon.reflect.code.CtBodyHolder;
import spoon.reflect.code.CtExpression;
import spoon.reflect.code.CtStatement;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.annotations.PropertyGetter;
import spoon.reflect.annotations.PropertySetter;
import spoon.support.UnsettableProperty;
import java.util.List;
import java.util.Set;
import static spoon.reflect.path.CtRole.DEFAULT_EXPRESSION;
/**
* This element defines an annotation method declared in an annotation type.
*/
public interface CtAnnotationMethod<T> extends CtMethod<T> {
/**
* Gets the default expression assigned to the annotation method.
*/
@PropertyGetter(role = DEFAULT_EXPRESSION)
CtExpression<T> getDefaultExpression();
/**
* Sets the default expression assigned to the annotation method.
*/
@PropertySetter(role = DEFAULT_EXPRESSION)
<C extends CtAnnotationMethod<T>> C setDefaultExpression(CtExpression<T> assignedExpression);
@Override
CtAnnotationMethod<T> clone();
@Override
@UnsettableProperty
<T1 extends CtBodyHolder> T1 setBody(CtStatement body);
@Override
@UnsettableProperty
<T1 extends CtExecutable<T>> T1 setThrownTypes(Set<CtTypeReference<? extends Throwable>> thrownTypes);
@Override
@UnsettableProperty
<T extends CtFormalTypeDeclarer> T setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters);
@Override
@UnsettableProperty
<T1 extends CtExecutable<T>> T1 setParameters(List<CtParameter<?>> parameters);
@UnsettableProperty
CtExecutable<?> setReceiverParameter(CtReceiverParameter receiverParameter);
@UnsettableProperty
@Nullable
CtReceiverParameter getReceiverParameter();
}