All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.evosuite.instrumentation.EmptyVisitor Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (C) 2010-2018 Gordon Fraser, Andrea Arcuri and EvoSuite
 * contributors
 *
 * This file is part of EvoSuite.
 *
 * EvoSuite is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation, either version 3.0 of the License, or
 * (at your option) any later version.
 *
 * EvoSuite is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with EvoSuite. If not, see .
 */
/**
 * 
 */
package org.evosuite.instrumentation;

import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;

/**
 * 

EmptyVisitor class.

* * @author fraser */ public class EmptyVisitor extends ClassVisitor { AnnotationVisitor av = new AnnotationVisitor(Opcodes.ASM5) { @Override public AnnotationVisitor visitAnnotation(String name, String desc) { return this; } @Override public AnnotationVisitor visitArray(String name) { return this; } }; /** *

Constructor for EmptyVisitor.

*/ public EmptyVisitor() { super(Opcodes.ASM5); } /** {@inheritDoc} */ @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { return av; } /** {@inheritDoc} */ @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { return new FieldVisitor(Opcodes.ASM5) { @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { return av; } }; } /** {@inheritDoc} */ @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { return new MethodVisitor(Opcodes.ASM5) { @Override public AnnotationVisitor visitAnnotationDefault() { return av; } @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { return av; } @Override public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) { return av; } }; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy