All Downloads are FREE. Search and download functionalities are using the official Maven repository.

react4j.annotations.InputValidate Maven / Gradle / Ivy

The newest version!
package react4j.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;

/**
 * Identifies method that is called when the input value is specified or changes.
 *
 * 

The method must also conform to the following constraints:

*
    *
  • Must not be annotated with any other react4j annotation
  • *
  • Must have 1 parameter that matches the type of the input
  • *
  • Must not return a value
  • *
  • Must not be private
  • *
  • Must not be public
  • *
  • Must not be static
  • *
  • Must not be abstract
  • *
  • Must not throw exceptions
  • *
  • Must be accessible from the same package as the class annotated by {@link View}
  • *
  • * Should not be public as not expected to be invoked outside the view. A warning will be generated but can * be suppressed by the {@link SuppressWarnings} or {@link SuppressReact4jWarnings} annotations with a key * "React4j:PublicMethod". This warning is also suppressed by the annotation processor if it is implementing * an interface method. *
  • *
  • * Should not be protected if in the class annotated with the {@link View} annotation as the method is not * expected to be invoked outside the view. A warning will be generated but can be suppressed by the * {@link SuppressWarnings} or {@link SuppressReact4jWarnings} annotations with a key "React4j:ProtectedMethod". *
  • *
*/ @Documented @Target( ElementType.METHOD ) public @interface InputValidate { /** * Return the name of the associated input. If the value is not specified then the name * will be derived assuming that the method name matches the pattern "validate[Name]" * * @return the name of the input. */ @Nonnull String name() default ""; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy