说.
  • 2019-07-07 07:32:45 103.226.196.* 对n**t说:
    vscode/j
    赞(26) 查看 回复
  • 2019-07-07 07:30:10 103.226.196.* 对c**t说:
    import java.util.Arrays;

    //M.java
    public class M {
    private void name() {

    }
    public static void main(String[] args) throws ClassNotFoundException{


    Class cls = Class.forName("M");

    Arrays.stream(
    cls.getDeclaredMethods()
    ).map(x->x.getName())
    .forEach(System.out::println);

    }

    }
    赞(26) 查看 回复
  • 2019-07-07 07:07:53 103.226.196.* 对c**t说:
    //G.java
    import java.lang.annotation.*;


    @Target({ElementType.TYPE,ElementType.METHOD})
    @Retention(RetentionPolicy.RUNTIME)
    @Inherited
    public @interface G{
    public String name() default "axgle";
    }

    // C.java
    @G(name="this is a test!")
    public class C{

    }


    //M.java
    public class M {

    public static void main(String[] args) {

    try {
    Class cls = Class.forName("C");

    // C cc = cls.getAnnotation(C.class);
    G g = (G)cls.getAnnotation(G.class);

    System.out.println(
    g.name()
    );

    } catch (ClassNotFoundException e) {
    //TODO: handle exception
    }

    System.out.println("google");
    }

    }

    1. https://www.cnblogs.com/Qian123/p/5256084.html
      oo[26] xx[0] 2019-07-07 07:09:01

    赞(22) 查看 回复
  • 2019-07-07 06:36:24 103.226.196.* 对c**t说:
    https://www.cnblogs.com/Qian123/p/5256084.html
    --
    现场注释 vs 远程引用注释

    1. 注解 是 现场注释
      oo[26] xx[0] 2019-07-07 06:36:45

    赞(23) 查看 回复
  • 2019-07-07 00:18:25 103.226.196.* 对c**t说:
    maven{ url 'http://maven.aliyun.com/nexus/content/groups/public'}
    赞(32) 查看 回复

  • 关于本站 @ 2018