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

react4j.processor.OnInputChangeDescriptor Maven / Gradle / Ivy

There is a newer version: 0.196
Show newest version
package react4j.processor;

import java.util.List;
import java.util.Objects;
import javax.annotation.Nonnull;
import javax.lang.model.element.ExecutableElement;

final class OnInputChangeDescriptor
{
  @Nonnull
  private final ExecutableElement _method;
  @Nonnull
  private final List _inputs;
  /**
   * Flag set to true if the hook method is invoked prior to update.
   */
  private final boolean _preUpdate;

  OnInputChangeDescriptor( @Nonnull final ExecutableElement method,
                           @Nonnull final List inputs,
                           final boolean preUpdate )
  {
    _method = Objects.requireNonNull( method );
    _inputs = Objects.requireNonNull( inputs );
    _preUpdate = preUpdate;
    _inputs.forEach( InputDescriptor::markAsOnChangePresent );
  }

  @Nonnull
  ExecutableElement getMethod()
  {
    return _method;
  }

  boolean isPreUpdate()
  {
    return _preUpdate;
  }

  @Nonnull
  List getInputs()
  {
    return _inputs;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy