Class GwtSpecificValidatorCreator

    • Constructor Detail

      • GwtSpecificValidatorCreator

        public GwtSpecificValidatorCreator​(com.google.gwt.core.ext.typeinfo.JClassType validatorType,
                                           com.google.gwt.core.ext.typeinfo.JClassType beanType,
                                           BeanHelper beanHelper,
                                           com.google.gwt.core.ext.TreeLogger logger,
                                           com.google.gwt.core.ext.GeneratorContext context,
                                           BeanHelperCache cache,
                                           Class<?>[] validGroupsFromAnnotation)
        constructor.
        Parameters:
        validatorType - jclass type of the validator
        beanType - jclass type of the bean
        beanHelper - bean helper
        logger - tree logger
        context - generator context
        cache - bean helper cache
        validGroupsFromAnnotation - arrray of validation groups
    • Method Detail

      • asGetter

        public static String asGetter​(javax.validation.metadata.PropertyDescriptor propertyDescriptor)
      • asLiteral

        public static String asLiteral​(Object value)
                                throws IllegalArgumentException
        Returns the literal value of an object that is suitable for inclusion in Java Source code.

        Supports all types that Annotation value can have.

        Parameters:
        value - the object to handle
        Returns:
        string of the literal
        Throws:
        IllegalArgumentException - if the type of the object does not have a java literal form.
      • isIterableOrMap

        public static boolean isIterableOrMap​(Class<?> elementClass)
        check if elementClass is iterable.
        Parameters:
        elementClass - class to check
        Returns:
        true if iterable, otherwise false
      • compose

        protected void compose​(com.google.gwt.user.rebind.ClassSourceFileComposerFactory composerFactory)
        Specified by:
        compose in class AbstractCreator
      • writeClassBody

        protected void writeClassBody​(com.google.gwt.user.rebind.SourceWriter sw)
                               throws com.google.gwt.core.ext.UnableToCompleteException
        Specified by:
        writeClassBody in class AbstractCreator
        Throws:
        com.google.gwt.core.ext.UnableToCompleteException
      • writeUnsafeNativeLongIfNeeded

        protected void writeUnsafeNativeLongIfNeeded​(com.google.gwt.user.rebind.SourceWriter sw,
                                                     com.google.gwt.core.ext.typeinfo.JType jtype)