You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

FdVisitor.java 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* *******************************************************************
  2. * Copyright (c) 2006 Contributors
  3. * All rights reserved.
  4. * This program and the accompanying materials are made available
  5. * under the terms of the Eclipse Public License v1.0
  6. * which accompanies this distribution and is available at
  7. * http://www.eclipse.org/legal/epl-v10.html
  8. *
  9. * Contributors:
  10. * Andy Clement IBM initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.weaver.asm;
  13. import org.aspectj.org.objectweb.asm.AnnotationVisitor;
  14. import org.aspectj.org.objectweb.asm.Attribute;
  15. import org.aspectj.org.objectweb.asm.FieldVisitor;
  16. import org.aspectj.weaver.AnnotationAJ;
  17. /**
  18. * Constructed with an AsmField to 'fill in' with attributes and annotations
  19. */
  20. class FdVisitor implements FieldVisitor {
  21. AsmField field;
  22. public FdVisitor(AsmField rm) { field = rm;}
  23. public AnnotationVisitor visitAnnotation(String desc, boolean isVisible) {
  24. AnnotationAJ annotation = new AnnotationAJ(desc,isVisible);
  25. field.addAnAnnotation(annotation);
  26. // if (am.annotations==null) am.annotations = new ArrayList();
  27. // am.annotations.add(annotation);
  28. return new AnnVisitor(annotation);
  29. }
  30. public void visitAttribute(Attribute arg0) {}
  31. public void visitEnd() {}
  32. }