Code example for AnnotatedElement

Methods: isAnnotationPresent

0
Member member = ip.getMember();
      if (member instanceof AnnotatedElement)
      { 
         AnnotatedElement ae = (AnnotatedElement) member;
         if (ae.isAnnotationPresent(Null.class) == false)
            throw new IllegalArgumentException("Illegal @Current Client usage: " + ip);
      } 
   } 
 
   public static Long getClientId(HttpServletRequest request)
   { 
      return (Long) request.getAttribute(Client.class.getName() + ".id");
   } 
 
   public static void setClientId(HttpServletRequest request, Long clientId)
   { 
      request.setAttribute(Client.class.getName() + ".id", clientId);
   } 
 
Contextual code suggestions in your IDE  Get Codota for Java