com.qitsoft.qimono.internal.RegistryAnnotationAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qimono Show documentation
Show all versions of qimono Show documentation
The framework library base on Mockito used to stub methods with private visibility, final methods or static methods.
Also this library could be used to assign/retrieve values from private fields and to substitute date and time in tests.
The newest version!
/*
* Copyright (C) 2011 QitSoft Inc.
*
* This file is part of Qimono.
*
* Qimono 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 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*/
package com.qitsoft.qimono.internal;
import java.util.ArrayList;
import java.util.List;
import org.objectweb.asm.AnnotationVisitor;
/**
* The Annotation visitor which registers the instructions and after that
* could be replayed.
*
* @author Serghei Soloviov
*/
public class RegistryAnnotationAdapter implements AnnotationVisitor {
private static final int VISIT = 1;
private static final int ENUM = 2;
private static final int ANNOTATION = 3;
private static final int ARRAY = 4;
private static final int END = 5;
private List