1 22 package org.jboss.reflect.plugins; 23 24 import org.jboss.reflect.spi.AnnotationValue; 25 import org.jboss.reflect.spi.ParameterInfo; 26 import org.jboss.reflect.spi.TypeInfo; 27 28 33 public class ParameterInfoImpl extends AnnotationHolder implements ParameterInfo 34 { 35 36 private static final long serialVersionUID = 3256725082746664754L; 37 38 39 protected String name; 40 41 42 protected TypeInfo parameterType; 43 44 47 public ParameterInfoImpl() 48 { 49 } 50 51 58 public ParameterInfoImpl(AnnotationValue[] annotations, String name, TypeInfo parameterType) 59 { 60 super(annotations); 61 this.name = name; 62 this.parameterType = parameterType; 63 } 64 65 public String getName() 66 { 67 return name; 68 } 69 70 public TypeInfo getParameterType() 71 { 72 return parameterType; 73 } 74 75 public boolean equals(Object obj) 76 { 77 if (this == obj) 78 return true; 79 if (obj == null || obj instanceof ParameterInfo == false) 80 return false; 81 82 ParameterInfo other = (ParameterInfo) obj; 83 return parameterType.equals(other.getParameterType()); 84 } 85 86 public int hashCode() 87 { 88 return parameterType.hashCode(); 89 } 90 } 91 | Popular Tags |