Вы не можете выбрать более 25 тем
Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
12345678910111213 |
- import org.aspectj.lang.annotation.Aspect;
- import java.lang.annotation.*;
-
- public aspect SimpleAspect {
-
- public static void main(String[] args) {
- Annotation[] annotations = SimpleAspect.class.getAnnotations();
- if (annotations.length != 1) throw new RuntimeException("Should have one annotation but has "+annotations.length);
- Aspect aspectAnnotation = (Aspect) annotations[0];
- if (!aspectAnnotation.value().equals("")) throw new RuntimeException("value should be empty");
- }
-
- }
|