Class VariableValueCopier.CopySpec

  • Enclosing class:
    VariableValueCopier

    public static class VariableValueCopier.CopySpec
    extends java.lang.Object
    Defines a copy specification.
    Author:
    Holger Eichelberger
    • Field Detail

      • sourceVariableName

        private java.lang.String sourceVariableName
      • targetVariableNames

        private java.lang.String[] targetVariableNames
    • Constructor Detail

      • CopySpec

        public CopySpec​(Compound type,
                        java.lang.String sourceVariableName,
                        java.lang.String... targetVariableNames)
        Creates a copy specification.
        Parameters:
        type - the source type (may be null then the spec is ignored)
        sourceVariableName - the source variable name, may be given in compound access style for nested variables (may be null then the spec is ignored)
        targetVariableNames - the target variable names, may be given in compound access style for nested variables; the first one receives the copy, the other one references to the copy if they are reference variables (may be null then the spec is ignored)
      • CopySpec

        public CopySpec​(Compound type,
                        java.lang.String sourceVariableName,
                        VariableValueCopier.IFreezeProvider freezeProvider,
                        java.lang.String... targetVariableNames)
        Creates a copy specification.
        Parameters:
        type - the source type (may be null then the spec is ignored)
        sourceVariableName - the source variable name, may be given in compound access style for nested variables (may be null then the spec is ignored)
        freezeProvider - describes how new variables shall be frozen (may be null for no freezing)
        targetVariableNames - the target variable names, may be given in compound access style for nested variables; the first one receives the copy, the other one references to the copy if they are reference variables (may be null then the spec is ignored)
    • Method Detail

      • getType

        public Compound getType()
        Returns the source type.
        Returns:
        the source type
      • getSourceVariableName

        public java.lang.String getSourceVariableName()
        Returns the source variable name.
        Returns:
        the source variable name, may be given in compound access style for nested variables
      • getTargetVariableNames

        public java.lang.String[] getTargetVariableNames()
        Returns the target variable names.
        Returns:
        the target variable names, may be given in compound access style for nested variables
      • isValid

        public boolean isValid()
        Returns whether this instance is valid.
        Returns:
        true for valid, false else