Java Aspectj Usage isConstantPushInstruction(Instruction i)

Here you can find the source of isConstantPushInstruction(Instruction i)

Description

is Constant Push Instruction

License

Open Source License

Declaration

public static boolean isConstantPushInstruction(Instruction i) 

Method Source Code

//package com.java2s;
/* *******************************************************************
 * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
 * All rights reserved. /*from ww w  . ja  v  a 2s  .  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.apache.bcel.Constants;

import org.aspectj.apache.bcel.generic.Instruction;

public class Main {
    public static boolean isConstantPushInstruction(Instruction i) {
        long ii = Constants.instFlags[i.opcode];
        return ((ii & Constants.PUSH_INST) != 0 && (ii & Constants.CONSTANT_INST) != 0);
    }
}

Related

  1. getSignature(Signature signature, String nameFromAnnotation, boolean absolute)
  2. getSourceLine(InstructionHandle ih)
  3. getTargetClass(JoinPoint jp)
  4. getTargets(IProgramElement node, IRelationship.Kind kind)
  5. isAnonymous(IProgramElement node)
  6. isSuppressing(Member member, String lintkey)
  7. proceedAroundCallAtAspectJ(JoinPoint thisJoinPoint)
  8. process(ProceedingJoinPoint point, Object[] args)
  9. readAjAttributes(String classname, Attribute[] as, ISourceContext context, World w, AjAttribute.WeaverVersionInfo version, ConstantPoolReader dataDecompressor)