Package com.em.validation.rebind.metadata

Examples of com.em.validation.rebind.metadata.ClassDescriptor


  @Override
  public String generate(TreeLogger logger, GeneratorContext context,  String typeName) throws UnableToCompleteException {
    //get locale
    GwtLocale current = this.getCurrentGenerationLocale(logger, context);   
   
    ClassDescriptor messageDescriptor = MessageGenerator.INSTANCE.generateMessage(current);
   
    this.generateClass(messageDescriptor,logger,context)
   
    //reset this
    this.reset();
   
    return messageDescriptor.getFullClassName();
  }
View Full Code Here


  private static class SourceConstraintDescriptorGenerator extends AbstractConstraintDescriptorGenerator<ClassDescriptor> {

    @Override
    protected ClassDescriptor create(ConstraintMetadata metadata) {
      //class descriptor
      ClassDescriptor descriptor = new ClassDescriptor();

      //uuid
      UUID uuid = UUID.randomUUID();
      String uuidString = uuid.toString();
      uuidString = uuidString.replaceAll("\\-","");
     
      //create generation target annotation name
      String generatedConstraintName = ConstraintDescriptionGenerator.INSTANCE.getClassPrefix() + "_" + uuidString;
      String fullGeneratedConstraintName = ConstraintDescriptionGenerator.INSTANCE.getTargetPackage() + "." +generatedConstraintName;
             
      //generate constraint descriptor
      descriptor.setFullClassName(fullGeneratedConstraintName);
      descriptor.setClassName(generatedConstraintName);
      descriptor.setPackageName(ConstraintDescriptionGenerator.INSTANCE.getTargetPackage());
     
      return descriptor;
    }
View Full Code Here

public class GwtConstraintValidatorFactoryGenerator extends GwtGenerator {
 
  @Override
  public String generate(TreeLogger logger, GeneratorContext context,  String typeName) throws UnableToCompleteException {
   
    ClassDescriptor factoryDescriptor = ConstraintValidatorFactoryGenerator.INSTANCE.generateConstraintValidatorFactory();
   
    this.generateClass(factoryDescriptor,logger,context)
   
    //reset this
    this.reset();
   
    //reset the related factories
    AnnotationInstanceFactoryGenerator.INSTANCE.clear();
   
    return factoryDescriptor.getFullClassName();
  }
View Full Code Here

public class GwtReflectorFactoryGenerator extends GwtGenerator {
 
  @Override
  public String generate(TreeLogger logger, GeneratorContext context,  String typeName) throws UnableToCompleteException {
   
    ClassDescriptor factoryDescriptor = ReflectorFactoryGenerator.INSTANCE.getReflectorFactoryDescriptors();
   
    this.generateClass(factoryDescriptor,logger,context)
   
    //reset this
    this.reset();
   
    //reset the related factories
    ReflectorFactoryGenerator.INSTANCE.clear();
   
    return factoryDescriptor.getFullClassName();
  }
View Full Code Here

TOP

Related Classes of com.em.validation.rebind.metadata.ClassDescriptor

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.