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

arez.annotations.ObservableRef Maven / Gradle / Ivy

There is a newer version: 0.95
Show newest version
package arez.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import javax.annotation.Nonnull;
import org.realityforge.anodoc.Unsupported;

/**
 * Marks a template method that returns the {@link arez.Observable} instance for
 * the {@link Observable} annotated property. Each property marked with the {@link Observable} annotation is backed
 * by an {@link arez.Observable} instance and some frameworks make use of this value to implement
 * advanced functionality.
 *
 * 

The method that is annotated with @ObservableRef must also comply with the following constraints:

*
    *
  • Must not be annotated with any other arez annotation
  • *
  • Must not be private
  • *
  • Must not be static
  • *
  • Must not be final
  • *
  • Must be abstract
  • *
  • Must not throw any exceptions
  • *
  • Must return an instance of {@link arez.Observable}.
  • *
*/ @Documented @Target( ElementType.METHOD ) @Unsupported( "This is largely experimental and intended for framework users rather than casual users of the framework" ) public @interface ObservableRef { /** * Return the name of the associated Observable property that this ref relates to. * This value will be derived if the method name matches the pattern "get[Name]Observable", * otherwise it must be specified. * * @return the name of the associated Observable. */ @Nonnull String name() default ""; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy