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.

AnnotationNameValuePair.java 1.1KB

15 years ago
14 years ago
15 years ago
14 years ago
15 years ago
14 years ago
15 years ago
14 years ago
15 years ago
14 years ago
15 years ago
14 years ago
15 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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;
  13. public class AnnotationNameValuePair {
  14. private String name;
  15. private AnnotationValue val;
  16. public AnnotationNameValuePair(String name, AnnotationValue val) {
  17. this.name = name;
  18. this.val = val;
  19. }
  20. public String getName() {
  21. return name;
  22. }
  23. public AnnotationValue getValue() {
  24. return val;
  25. }
  26. public String toString() {
  27. StringBuffer sb = new StringBuffer();
  28. sb.append(name + "=" + val.toString());
  29. return sb.toString();
  30. }
  31. public String stringify() {
  32. StringBuffer sb = new StringBuffer();
  33. if (!name.equals("value")) {
  34. sb.append(name + "=");
  35. }
  36. sb.append(val.stringify());
  37. return sb.toString();
  38. }
  39. }