Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

BcelConstantPoolReader.java 1.0KB

12345678910111213141516171819202122232425262728293031323334
  1. /* *******************************************************************
  2. * Copyright (c) 2010 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 (SpringSource)
  11. * ******************************************************************/
  12. package org.aspectj.weaver.bcel;
  13. import org.aspectj.apache.bcel.classfile.ConstantPool;
  14. import org.aspectj.weaver.ConstantPoolReader;
  15. /**
  16. * An implementation of the constant pool reader that speaks Bcel.
  17. *
  18. * @author Andy Clement
  19. */
  20. public class BcelConstantPoolReader implements ConstantPoolReader {
  21. private ConstantPool constantPool;
  22. public BcelConstantPoolReader(ConstantPool constantPool) {
  23. this.constantPool = constantPool;
  24. }
  25. public String readUtf8(int cpIndex) {
  26. return constantPool.getConstantUtf8(cpIndex).getValue();
  27. }
  28. }