packagecom.clown.annotation;//内置注解publicclassTest01{//默认 extends Object//@Override 重写的注解@OverridepublicStringtoString(){returnsuper.toString();}//@Deprecated 表示不鼓励程序员使用这样的元素,通常是因为它很危险或者存在更好的选择@Deprecatedpublicstaticvoidtest(){System.out.println("Deprecated");}publicstaticvoidmain(String[] args){test();//被 @Deprecated注解的方法依旧是能够使用的,只是不推荐使用}/*
定义一个方法和一个变量,但不使用它们,正常情况下程序在编译时会提出以下警告:Method 'test020' is never used 和 Variable 'name' is never used。
但我们加上注解:@SuppressWarnings("all") 后,程序在编译时就不再对此方法和方法内的变量提出警告了。
*///@SuppressWarnings("XXX") 抑制编译时的警告信息@SuppressWarnings("all")publicvoidtest02(){String name =null;}}
门面模式和适配器模式是代码级的设计模式,而防腐层本质是一种 防御型策略 ,在更高的层级对系统进行解耦 1 关于防腐层
Anti-Corruption Layer(ACL) 如下: Implement a faade or adapter layer between different subsystems that dont share…