Java Aspectj Usage isSuppressing(Member member, String lintkey)

Here you can find the source of isSuppressing(Member member, String lintkey)

Description

Checks for suppression specified on the member or on the declaring type of that member

License

Open Source License

Declaration

public static boolean isSuppressing(Member member, String lintkey) 

Method Source Code

//package com.java2s;
/* *******************************************************************
 * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
 * All rights reserved. /*from   w  w w.  j a va2s. c o  m*/
 * This program and the accompanying materials are made available 
 * under the terms of the Eclipse Public License v1.0 
 * which accompanies this distribution and is available at 
 * http://www.eclipse.org/legal/epl-v10.html 
 *  
 * Contributors: 
 *     PARC     initial implementation 
 * ******************************************************************/

import org.aspectj.weaver.Member;
import org.aspectj.weaver.ResolvedType;
import org.aspectj.weaver.UnresolvedType;
import org.aspectj.weaver.Utils;

public class Main {
    /**
     * Checks for suppression specified on the member or on the declaring type of that member
     */
    public static boolean isSuppressing(Member member, String lintkey) {
        boolean isSuppressing = Utils.isSuppressing(member.getAnnotations(), lintkey);
        if (isSuppressing) {
            return true;
        }
        UnresolvedType type = member.getDeclaringType();
        if (type instanceof ResolvedType) {
            return Utils.isSuppressing(((ResolvedType) type).getAnnotations(), lintkey);
        }
        return false;
    }
}

Related

  1. getSourceLine(InstructionHandle ih)
  2. getTargetClass(JoinPoint jp)
  3. getTargets(IProgramElement node, IRelationship.Kind kind)
  4. isAnonymous(IProgramElement node)
  5. isConstantPushInstruction(Instruction i)
  6. proceedAroundCallAtAspectJ(JoinPoint thisJoinPoint)
  7. process(ProceedingJoinPoint point, Object[] args)
  8. readAjAttributes(String classname, Attribute[] as, ISourceContext context, World w, AjAttribute.WeaverVersionInfo version, ConstantPoolReader dataDecompressor)
  9. renderArgs(JoinPoint jp)