These two annotations come from lombok, and act on object classes, which can be constructed with parameters or without parameters;
among them, @NoArgsConstructor is a constructor without parameters, which is usually used together with @Data. The specific source code is as follows
package lombok;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({
ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
public @interface AllArgsConstructor {
String staticName() default "";
AllArgsConstructor.AnyAnnotation[] onConstructor() default {
};
AccessLevel access() default AccessLevel.PUBLIC;
/** @deprecated */
@Deprecated
@Retention(RetentionPolicy.SOURCE)
@Target({
})
public @interface AnyAnnotation {
}
}
package lombok;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({
ElementType.TYPE})
@Retention(RetentionPolicy.SOURCE)
public @interface NoArgsConstructor {
String staticName() default "";
NoArgsConstructor.AnyAnnotation[] onConstructor() default {
};
AccessLevel access() default AccessLevel.PUBLIC;
boolean force() default false;
/** @deprecated */
@Deprecated
@Retention(RetentionPolicy.SOURCE)
@Target({
})
public @interface AnyAnnotation {
}
}