@Test public void defaultValues() { testHelper.getPsiClass( psiClasses -> { assertNotNull(psiClasses); PsiClass psiClass = psiClasses.get(0); PsiParameter[] parameters = PsiTreeUtil.findChildOfType(psiClass, PsiParameterList.class).getParameters(); Prop prop = PsiAnnotationProxyUtils.findAnnotationInHierarchy(parameters[0], Prop.class); assertNotNull(prop); assertFalse(prop.optional()); assertFalse(prop.isCommonProp()); assertFalse(prop.overrideCommonPropBehavior()); assertFalse(prop.dynamic()); assertEquals(ResType.NONE, prop.resType()); return true; }, "WithAnnotationClass.java"); }
@Nullable public static <T extends Annotation> T findAnnotationInHierarchy( PsiModifierListOwner listOwner, Class<T> annotationClass) { T basicProxy = AnnotationUtil.findAnnotationInHierarchy(listOwner, annotationClass); if (basicProxy == null) { return null; } T biggerProxy = (T) Proxy.newProxyInstance( annotationClass.getClassLoader(), new Class[] {annotationClass}, new AnnotationProxyInvocationHandler(basicProxy, listOwner, annotationClass)); return biggerProxy; }
PsiAnnotationProxyUtils { @Nullable public static <T extends Annotation> T findAnnotationInHierarchy( PsiModifierListOwner listOwner, Class<T> annotationClass) { T basicProxy = AnnotationUtil.findAnnotationInHierarchy(listOwner, annotationClass); if (basicProxy == null) { return null; } T biggerProxy = (T) Proxy.newProxyInstance( annotationClass.getClassLoader(), new Class[] {annotationClass}, new AnnotationProxyInvocationHandler(basicProxy, listOwner, annotationClass)); return biggerProxy; } }
PsiAnnotationProxyUtils { @Nullable public static <T extends Annotation> T findAnnotationInHierarchy( PsiModifierListOwner listOwner, Class<T> annotationClass) { T basicProxy = AnnotationUtil.findAnnotationInHierarchy(listOwner, annotationClass); if (basicProxy == null) { return null; } T biggerProxy = (T) Proxy.newProxyInstance( annotationClass.getClassLoader(), new Class[] {annotationClass}, new AnnotationProxyInvocationHandler(basicProxy, listOwner, annotationClass)); return biggerProxy; }  }
PsiAnnotationProxyUtils { @Nullable public static <T extends Annotation> T findAnnotationInHierarchy( PsiModifierListOwner listOwner, Class<T> annotationClass) { T basicProxy = AnnotationUtil.findAnnotationInHierarchy(listOwner, annotationClass); if (basicProxy == null) { return null; } T biggerProxy = (T) Proxy.newProxyInstance( annotationClass.getClassLoader(), new Class[] {annotationClass}, new AnnotationProxyInvocationHandler(basicProxy, listOwner, annotationClass)); return biggerProxy; }  @Nullable static T findAnnotationInHierarchy(
      PsiModifierListOwner listOwner, Class<T> annotationClass); }
PsiAnnotationProxyUtils { @Nullable public static <T extends Annotation> T findAnnotationInHierarchy( PsiModifierListOwner listOwner, Class<T> annotationClass) { T basicProxy = AnnotationUtil.findAnnotationInHierarchy(listOwner, annotationClass); if (basicProxy == null) { return null; } T biggerProxy = (T) Proxy.newProxyInstance( annotationClass.getClassLoader(), new Class[] {annotationClass}, new AnnotationProxyInvocationHandler(basicProxy, listOwner, annotationClass)); return biggerProxy; }  @Nullable static T findAnnotationInHierarchy(
      PsiModifierListOwner listOwner, Class<T> annotationClass);  }