File tree Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Expand file tree Collapse file tree 5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ 4
2+ true
3+ [@beans.LibraryAnnotation_1()]
4+ some text
5+ other text
Original file line number Diff line number Diff line change 1+ class A {
2+ @ scala.beans.BeanProperty val x = 4
3+ @ scala.beans.BooleanBeanProperty val y = true
4+ @ scala.beans.BeanProperty var mutableOneWithLongName = " some text"
5+
6+ @ scala.beans.BeanProperty
7+ @ beans.LibraryAnnotation_1
8+ val retainingAnnotation = 5
9+ }
Original file line number Diff line number Diff line change 1+ package beans ;
2+
3+ import java .lang .annotation .Retention ;
4+ import java .lang .annotation .RetentionPolicy ;
5+
6+ @ Retention (RetentionPolicy .RUNTIME )
7+ public @interface LibraryAnnotation_1 {}
Original file line number Diff line number Diff line change 1+ import java .util .Arrays ;
2+
3+ class JavaTest {
4+ public A run () throws ReflectiveOperationException {
5+ A a = new A ();
6+ System .out .println (a .getX ());
7+ System .out .println (a .isY ());
8+
9+ System .out .println (Arrays .asList (a .getClass ().getMethod ("getRetainingAnnotation" ).getAnnotations ()));
10+
11+ System .out .println (a .getMutableOneWithLongName ());
12+ a .setMutableOneWithLongName ("other text" );
13+ return a ;
14+ }
15+ }
Original file line number Diff line number Diff line change 1+ object Test :
2+ def main (args : Array [String ]) =
3+ val a = JavaTest ().run()
4+ println(a.mutableOneWithLongName)
You can’t perform that action at this time.
0 commit comments