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.2KB

15 jaren geleden
15 jaren geleden
14 jaren geleden
15 jaren geleden
14 jaren geleden
15 jaren geleden
14 jaren geleden
15 jaren geleden
14 jaren geleden
14 jaren geleden
15 jaren geleden
15 jaren geleden
14 jaren geleden
15 jaren geleden
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 v 2.0
  6. * which accompanies this distribution and is available at
  7. * https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt
  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. StringBuilder sb = new StringBuilder();
  28. sb.append(name + "=" + val.toString());
  29. return sb.toString();
  30. }
  31. public String stringify() {
  32. StringBuilder sb = new StringBuilder();
  33. if (!name.equals("value")) {
  34. sb.append(name + "=");
  35. }
  36. sb.append(val.stringify());
  37. return sb.toString();
  38. }
  39. }