使用lsyncd实时同步.
2015-07-29 15:00
411 查看
package mypackage; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.Method; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) @interface TestAnnotation { public int id() default 5; public String description(); } class Anno { @TestAnnotation( id =6 ) public void g() {} @TestAnnotation( id =7 ) protected void i() {} @TestAnnotation( id =8 ) void f(){} @TestAnnotation( id =9 ) private void h() {} } public class Test { public static void main(String[] args) { Method[] methods = Anno.class.getMethods(); for (Method m : methods) { TestAnnotation a = m.getAnnotation(TestAnnotation.class); // System.out.print(m.getName()); if (a != null) System.out.print(a.id()); } } }
请问以上程序的输出是:
相关文章推荐
- Redis 使用基础
- 用JSP+Servlet+JavaBean模式实现简单的登录
- netty传输大文件实例
- Http协议详解
- Android Studio系列教程三 快捷键
- Linux单机TCP并发连接
- Android开发之详解五大布局
- Android 众多的布局属性详解
- MARK
- 修改网页任意区域内容
- hdu5323(2015多校3)--Solve this interesting problem(万万没想到,,,)
- sqoop 学习笔记
- sourceinsight常用快捷键和设置
- Mac 终端 常用命令总结2
- PHP 大数据量写入 csv文件 的一些代码片段
- 1. Perface
- css3字体效果
- Nodejs学习笔记(十一)--- 数据采集器示例(request和cheerio)
- res与res-auto的区别
- win7系统不兼容打不开零挂辅助该怎么办?