Package 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
  Direct Known Subclasses:
    `AnchorShadowVariableDescriptor`, `CustomShadowVariableDescriptor`, `InverseRelationShadowVariableDescriptor`

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

- - ### Field Summary

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

      `entityDescriptor, sinkVariableDescriptorList, variableMemberAccessor, variableName`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ShadowVariableDescriptor​(EntityDescriptor<Solution_> entityDescriptor, MemberAccessor variableMemberAccessor)` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract VariableListener<Solution_,​?>` | `buildVariableListener​(InnerScoreDirector<Solution_,​?> scoreDirector)` |
    `int` | `getGlobalShadowOrder()` |
    `abstract Demand<Solution_,​?>` | `getProvidedDemand()` |
    `abstract List<VariableDescriptor<Solution_>>` | `getSourceVariableDescriptorList()` | Inverse of `VariableDescriptor.getSinkVariableDescriptorList()`.
    `abstract Class<? extends VariableListener>` | `getVariableListenerClass()` |
    `boolean` | `hasVariableListener​(InnerScoreDirector<Solution_,​?> 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<Solution_,​?> getProvidedDemand()

      Returns:
        never null

    - #### hasVariableListener

          public boolean hasVariableListener​(InnerScoreDirector<Solution_,​?> 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`