class Variables implements IVariables {

  @Override
  public void initializeVariablesFrom( IVariables parent ) {
    this.parent = parent;

    // Clone the system properties to avoid ConcurrentModificationException while iterating
    // and then add all of them to properties variable.
    //
    Set<String> systemPropertiesNames = System.getProperties().stringPropertyNames();
    for ( String key : systemPropertiesNames ) {
      getProperties().put( key, System.getProperties().getProperty( key ) );
    }

    List<DescribedVariable> describedVariables = HopConfig.getInstance().getDescribedVariables();
    for ( DescribedVariable describedVariable : describedVariables ) {
      getProperties().put( describedVariable.getName(), describedVariable.getValue());
    }

    if ( parent != null ) {
      copyVariablesFrom( parent );
    }
    if ( injection != null ) {
      getProperties().putAll( injection );
      injection = null;
    }
    initialized = true;
  }

  public  Variables();

}