1 25 26 package org.objectweb.easybeans.deployment.annotations.metadata; 27 28 import org.objectweb.easybeans.deployment.annotations.JField; 29 30 34 public class FieldAnnotationMetadata extends CommonAnnotationMetadata { 35 36 39 41 44 private JField jField = null; 45 46 49 private ClassAnnotationMetadata classAnnotationMetadata = null; 50 51 54 private boolean inherited = false; 55 56 57 62 public FieldAnnotationMetadata(final JField jField, final ClassAnnotationMetadata classAnnotationMetadata) { 63 this.jField = jField; 64 this.classAnnotationMetadata = classAnnotationMetadata; 65 } 66 67 70 public String getFieldName() { 71 return this.jField.getName(); 72 } 73 74 77 public JField getJField() { 78 return this.jField; 79 } 80 81 84 @Override 85 public String toString() { 86 StringBuilder sb = new StringBuilder (); 87 String titleIndent = " "; 88 String indent = " "; 89 sb.append(titleIndent); 91 sb.append(this.getClass().getName().substring(this.getClass().getPackage().getName().length() + 1)); 92 sb.append("[\n"); 93 94 sb.append(super.toString()); 96 97 sb.append(indent); 99 sb.append("jField="); 100 sb.append(jField); 101 sb.append("\n"); 102 103 if (inherited) { 105 sb.append(indent); 106 sb.append("inherited="); 107 sb.append(inherited); 108 sb.append("\n"); 109 } 110 111 112 sb.append(titleIndent); 113 sb.append("]\n"); 114 return sb.toString(); 115 } 116 117 118 119 122 public boolean isInherited() { 123 return inherited; 124 } 125 126 130 public void setInherited(final boolean inherited) { 131 this.inherited = inherited; 132 } 133 134 137 public ClassAnnotationMetadata getClassAnnotationMetadata() { 138 return classAnnotationMetadata; 139 } 140 141 142 143 144 145 } 146 | Popular Tags |