<commit_before>package org.realityforge.arez.spy;

import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.realityforge.arez.Arez;

/**
 * A representation of an observable instance exposed to spy framework.
 */
public interface ObservableInfo
  extends ElementInfo
{
  /**
   * Return true if the Observable is a ComputedValue.
   *
   * @return true if the Observable is a ComputedValue.
   * @see org.realityforge.arez.Spy#isComputedValue(org.realityforge.arez.Observable)
   */
  boolean isComputedValue();

  /**
   * Convert the Observable to a ComputedValue.
   * This method should only be called if {@link #isComputedValue()} returns true.
   *
   * @return the ComputedValue instance.
   * @see org.realityforge.arez.Spy#asComputedValue(org.realityforge.arez.Observable)
   */
  ComputedValueInfo asComputedValue();

  /**
   * Return the list of observers for the Observable.
   * The list is an immutable copy of the observers of the {@link org.realityforge.arez.Observable}.
   *
   * @return the list of observers for Observable.
   * @see org.realityforge.arez.Spy#getObservers(org.realityforge.arez.Observable)
   */
  @Nonnull
  List<ObserverInfo> getObservers();

  /**
   * Return the component for the specified Observer.
   * This method should not be invoked if {@link Arez#areNativeComponentsEnabled()} returns false.
   *
   * @return the component that contains Observer if any.
   * @see org.realityforge.arez.Spy#getComponent(org.realityforge.arez.Observable)
   */
  @Nullable
  ComponentInfo getComponent();

  /**
   * Return true if the specified Observable has an accessor.
   * This method should not be invoked if {@link Arez#arePropertyIntrospectorsEnabled()} returns false.
   *
   * @return true if an accessor is available.<commit_msg>Fix javadocs<commit_after>package org.realityforge.arez.spy;

import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.realityforge.arez.Arez;

/**
 * A representation of an observable instance exposed to spy framework.
 */
public interface ObservableInfo
  extends ElementInfo
{
  /**
   * Return true if the Observable is a ComputedValue.
   *
   * @return true if the Observable is a ComputedValue.
   * @see org.realityforge.arez.Spy#isComputedValue(org.realityforge.arez.Observable)
   */
  boolean isComputedValue();

  /**
   * Convert the Observable to a ComputedValue.
   * This method should only be called if {@link #isComputedValue()} returns true.
   *
   * @return the ComputedValue instance.
   * @see org.realityforge.arez.Spy#asComputedValue(org.realityforge.arez.Observable)
   */
  ComputedValueInfo asComputedValue();

  /**
   * Return the list of observers for the Observable.
   * The list is an immutable copy of the observers of the {@link org.realityforge.arez.Observable}.
   *
   * @return the list of observers for Observable.
   * @see org.realityforge.arez.Spy#getObservers(org.realityforge.arez.Observable)
   */
  @Nonnull
  List<ObserverInfo> getObservers();

  /**
   * Return the component for the Observable.
   * This method should not be invoked if {@link Arez#areNativeComponentsEnabled()} returns false.
   *
   * @return the component that contains Observable if any.
   * @see org.realityforge.arez.Spy#getComponent(org.realityforge.arez.Observable)
   */
  @Nullable
  ComponentInfo getComponent();

  /**
   * Return true if the specified Observable has an accessor.
   * This method should not be invoked if {@link Arez#arePropertyIntrospectorsEnabled()} returns false.
   *
   * @return true if an accessor is available.
{'fraction_non_alphanumeric': 0.09534306971617526, 'fraction_numerical': 0.0, 'mean_word_length': 3.8464619492656875, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4939441', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1067, 'n_words': 321}