01: /*
02: * Copyright 2003 The Apache Software Foundation
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package net.sf.cglib.transform;
17:
18: import org.objectweb.asm.AnnotationVisitor;
19: import org.objectweb.asm.Attribute;
20: import org.objectweb.asm.FieldVisitor;
21:
22: public class FieldVisitorTee implements FieldVisitor {
23: private FieldVisitor fv1, fv2;
24:
25: public FieldVisitorTee(FieldVisitor fv1, FieldVisitor fv2) {
26: this .fv1 = fv1;
27: this .fv2 = fv2;
28: }
29:
30: public AnnotationVisitor visitAnnotation(String desc,
31: boolean visible) {
32: return AnnotationVisitorTee.getInstance(fv1.visitAnnotation(
33: desc, visible), fv2.visitAnnotation(desc, visible));
34: }
35:
36: public void visitAttribute(Attribute attr) {
37: fv1.visitAttribute(attr);
38: fv2.visitAttribute(attr);
39: }
40:
41: public void visitEnd() {
42: fv1.visitEnd();
43: fv2.visitEnd();
44: }
45: }
|