Package com.almende.eve.agent.annotation

Examples of com.almende.eve.agent.annotation.Access


   * @return available
   */
  private static boolean isAvailable(AnnotatedMethod method,
      RequestParams requestParams) {
    int mod = method.getActualMethod().getModifiers();
    Access access = method.getAnnotation(Access.class);
    return Modifier.isPublic(mod) &&
        hasNamedParams(method, requestParams) &&
        (access == null ||
        (access.value() != AccessType.UNAVAILABLE &&
         access.visible()));
  }
View Full Code Here


  private static boolean isAvailable(AnnotatedMethod method, AgentInterface destination,
      RequestParams requestParams) throws SecurityException, Exception {

    int mod = method.getActualMethod().getModifiers();
   
    Access MethodAccess = method.getAnnotation(Access.class);
    if (destination != null && !method.getActualMethod().getDeclaringClass().isAssignableFrom(destination.getClass()))
      return false;
    if (!(Modifier.isPublic(mod) && hasNamedParams(method, requestParams)))
      return false;

    Access ClassAccess = AnnotationUtil.get(destination != null?destination.getClass():method.getActualMethod().getDeclaringClass())
        .getAnnotation(Access.class);
    if (MethodAccess == null)
      MethodAccess = ClassAccess;
    if (MethodAccess == null)
      return true;
View Full Code Here

TOP

Related Classes of com.almende.eve.agent.annotation.Access

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.