Java Aspectj Usage setSourceLine(InstructionHandle ih, int lineNumber)

Here you can find the source of setSourceLine(InstructionHandle ih, int lineNumber)

Description

set Source Line

License

Open Source License

Declaration

public static void setSourceLine(InstructionHandle ih, int lineNumber) 

Method Source Code

//package com.java2s;
/* *******************************************************************
 * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
 * All rights reserved. //from   w w  w.j a  va 2s.  co 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.generic.InstructionHandle;

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

public class Main {
    public static void setSourceLine(InstructionHandle ih, int lineNumber) {
        // OPTIMIZE LineNumberTag instances for the same line could be shared
        // throughout a method...
        ih.addTargeter(new LineNumberTag(lineNumber));
    }
}

Related

  1. process(ProceedingJoinPoint point, Object[] args)
  2. readAjAttributes(String classname, Attribute[] as, ISourceContext context, World w, AjAttribute.WeaverVersionInfo version, ConstantPoolReader dataDecompressor)
  3. renderArgs(JoinPoint jp)
  4. renderJoinPoint(JoinPoint jp)
  5. resolveFileName(final String fileName)
  6. strip(String[] src, String[] toStrip)
  7. type(final JoinPoint joinPoint)
  8. typeName(final JoinPoint joinPoint)
  9. unWrapJoinPoint(final JoinPoint point)