org.optaplanner.core.impl.domain.variable.descriptor

## Class ShadowVariableDescriptor<Solution_>

- java.lang.Object
- - org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor<Solution_>
  - - org.optaplanner.core.impl.domain.variable.descriptor.ShadowVariableDescriptor<Solution_>

- Type Parameters:
    `Solution_` - the solution type, the class with the `PlanningSolution` annotation
  All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    AnchorShadowVariableDescriptor, CustomShadowVariableDescriptor, InverseRelationShadowVariableDescriptor

      public abstract class ShadowVariableDescriptor<Solution_>
      extends VariableDescriptor<Solution_>

  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor

      `entityDescriptor, sinkVariableDescriptorList, variableMemberAccessor, variableName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShadowVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract VariableListener<Solution_>` | `buildVariableListener(InnerScoreDirector<Solution_> scoreDirector)`
    `int` | `getGlobalShadowOrder()`
    `abstract Demand` | `getProvidedDemand()`
    `abstract List<VariableDescriptor<Solution_>>` | `getSourceVariableDescriptorList()` Inverse of `VariableDescriptor.getSinkVariableDescriptorList()`.
    `abstract Class<? extends VariableListener>` | `getVariableListenerClass()`
    `boolean` | `hasVariableListener(InnerScoreDirector scoreDirector)`
    `boolean` | `isGenuineAndUninitialized(Object entity)`
    `abstract void` | `processAnnotations(DescriptorPolicy descriptorPolicy)`
    `void` | `setGlobalShadowOrder(int globalShadowOrder)`
    `String` | `toString()`

    - ### Methods inherited from class org.optaplanner.core.impl.domain.variable.descriptor.VariableDescriptor

      `getEntityDescriptor, getMemberAccessorSpeedNote, getSimpleEntityAndVariableName, getSinkVariableDescriptorList, getValue, getVariableName, getVariablePropertyType, isValuePotentialAnchor, linkVariableDescriptors, registerSinkVariableDescriptor, setValue`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ShadowVariableDescriptor

          public ShadowVariableDescriptor(EntityDescriptor<Solution_> entityDescriptor,
                                          MemberAccessor variableMemberAccessor)

  - ### Method Detail

    - #### getGlobalShadowOrder

          public int getGlobalShadowOrder()

    - #### setGlobalShadowOrder

          public void setGlobalShadowOrder(int globalShadowOrder)

    - #### processAnnotations

          public abstract void processAnnotations(DescriptorPolicy descriptorPolicy)

    - #### getSourceVariableDescriptorList

          public abstract List<VariableDescriptor<Solution_>> getSourceVariableDescriptorList()

      Inverse of `VariableDescriptor.getSinkVariableDescriptorList()`.
      Returns:
        never null, only variables affect this shadow variable directly

    - #### getVariableListenerClass

          public abstract Class<? extends VariableListener> getVariableListenerClass()

    - #### getProvidedDemand

          public abstract Demand getProvidedDemand()

      Returns:
        never null

    - #### hasVariableListener

          public boolean hasVariableListener(InnerScoreDirector scoreDirector)

    - #### buildVariableListener

          public abstract VariableListener<Solution_> buildVariableListener(InnerScoreDirector<Solution_> scoreDirector)

      Parameters:
        `scoreDirector` - never null
      Returns:
        never null

    - #### isGenuineAndUninitialized

          public boolean isGenuineAndUninitialized(Object entity)

      Specified by:
        `isGenuineAndUninitialized` in class `VariableDescriptor<Solution_>`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.