1 16 17 package com.google.inject.util; 18 19 import java.lang.annotation.Annotation ; 20 import java.lang.annotation.Retention ; 21 import java.lang.annotation.RetentionPolicy ; 22 23 28 public class Annotations { 29 30 33 public static boolean isRetainedAtRuntime( 34 Class <? extends Annotation > annotationType) { 35 Retention retention = annotationType.getAnnotation(Retention .class); 36 return !(retention == null || retention.value() != RetentionPolicy.RUNTIME); 37 } 38 } 39 | Popular Tags |