Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.EnumConstantInfo


   public boolean equals(Object o)
   {
      if (this == o) return true;
      if (o == null || !(o instanceof EnumConstantInfo)) return false;

      final EnumConstantInfo enumConstantInfo = (EnumConstantInfo) o;

      if (name.equals(enumConstantInfo.getName()) == false)
         return false;
      if (!declaring.equals(enumConstantInfo.getDeclaring()))
         return false;

      return true;
   }
View Full Code Here


   {
      HashSet<EnumConstantInfo> expected = new HashSet<EnumConstantInfo>();
     
      for (Enum<?> enumeration : enumClass.getEnumConstants())
      {
         EnumConstantInfo constant = new EnumConstantInfoImpl(enumeration.name(), enumInfo);
         expected.add(constant);
      }
     
      EnumConstantInfo[] constants = enumInfo.getEnumConstants();
      assertNotNull(constants);
      HashSet<EnumConstantInfo> actual = new HashSet<EnumConstantInfo>();
      for (EnumConstantInfo c : constants)
         actual.add(c);
      assertEquals(expected, actual);
     
      for (Enum<?> enumeration : enumClass.getEnumConstants())
      {
         String name = enumeration.name();
         Field field = enumClass.getField(name);
         EnumConstantInfo constant = enumInfo.getEnumConstant(name);
         assertEnumConstantAnnotations(field, constant);
      }
   }
View Full Code Here

/*     */   public boolean equals(Object o)
/*     */   {
/* 100 */     if (this == o) return true;
/* 101 */     if ((o == null) || (!(o instanceof EnumConstantInfo))) return false;
/*     */
/* 103 */     EnumConstantInfo enumConstantInfo = (EnumConstantInfo)o;
/*     */
/* 105 */     if (!this.name.equals(enumConstantInfo.getName())) {
/* 106 */       return false;
/*     */     }
/* 108 */     return this.declaring.equals(enumConstantInfo.getDeclaring());
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.reflect.spi.EnumConstantInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.