-
Notifications
You must be signed in to change notification settings - Fork 0
/
Replace.java
38 lines (32 loc) · 997 Bytes
/
Replace.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
package com.kt.codegen;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Specifies a string or regular expression replacement in source code.
*/
@Target(ElementType.ANNOTATION_TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface Replace {
/**
* The plain string or regex expression to replace.
*
* @return The plain string or regex expression to replace.
*/
String from();
/**
* The string to replace {@link #from()} with.
*
* @return The string to replace {@link #from()} with.
*/
String to();
/**
* Specifies if {@link #from()} is a plain string to replace (false) or a regular
* expression (true) to replace.
*
* @return Specifies if {@link #from()} is a plain string to replace (false) or a
* regular expression (true) to replace.
*/
boolean regex() default false;
}