Package org.codehaus.enunciate

Examples of org.codehaus.enunciate.ClientName


   *
   * @return The simple name for client-side code generation.
   */
  public String getClientSimpleName() {
    String clientSimpleName = getSimpleName();
    ClientName clientName = getAnnotation(ClientName.class);
    if (clientName != null) {
      clientSimpleName = clientName.value();
    }
    return clientSimpleName;
  }
View Full Code Here


  @Override
  public ValidationResult validateEnumType(EnumTypeDefinition enumType) {
    ValidationResult result = super.validateEnumType(enumType);
    for (EnumConstantDeclaration enumItem : ((EnumDeclaration) enumType.getDelegate()).getEnumConstants()) {
      String simpleName = enumItem.getSimpleName();
      ClientName clientNameInfo = enumItem.getAnnotation(ClientName.class);
      if (clientNameInfo != null) {
        simpleName = clientNameInfo.value();
      }

      if ("event".equals(simpleName)) {
        result.addError(enumItem, "C# can't handle an enum constant named 'Event'. Either rename the enum constant, or use the @org.codehaus.enunciate.ClientName annotation to rename it on the client-side.");
      }
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.ClientName

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.