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.

EclipseAttributeAdapter.java 1.1KB

12345678910111213141516171819202122232425262728293031323334
  1. /* *******************************************************************
  2. * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC).
  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. * PARC initial implementation
  11. * ******************************************************************/
  12. package org.aspectj.ajdt.internal.compiler.ast;
  13. import org.aspectj.weaver.AjAttribute;
  14. import org.aspectj.org.eclipse.jdt.internal.compiler.IAttribute;
  15. import org.aspectj.org.eclipse.jdt.internal.compiler.codegen.ConstantPool;
  16. public class EclipseAttributeAdapter implements IAttribute {
  17. AjAttribute attr;
  18. public EclipseAttributeAdapter(AjAttribute attr) {
  19. this.attr = attr;
  20. }
  21. public char[] getNameChars() {
  22. return attr.getNameChars();
  23. }
  24. public byte[] getAllBytes(short nameIndex, ConstantPool constantPool) {
  25. return attr.getAllBytes(nameIndex, new EclipseConstantPoolWriter(constantPool));
  26. }
  27. }