org.eclipse.cdt.internal.core.envvar
Class EnvVarCollector

java.lang.Object
  extended by org.eclipse.cdt.internal.core.envvar.EnvVarCollector

public class EnvVarCollector
extends java.lang.Object

This class implements the "merging" functionality of environment variables Used by the EnvironmentVariableProvider to "merge" the sets of macros returned by different suppliers into one set returned to the user

Since:
3.0

Constructor Summary
EnvVarCollector()
           
 
Method Summary
 void add(IEnvironmentVariable[] vars)
          adds an array of environment variables to the set of variables held by this collector performing environment variable operations
 void add(IEnvironmentVariable[] vars, IEnvironmentContextInfo info, int num, ICoreEnvironmentVariableSupplier supplier)
           
 void clear()
           
 EnvVarDescriptor getVariable(java.lang.String name)
          Returns a variable of a given name held by this collector
 EnvVarDescriptor[] getVariables()
          Returns an array of variables held by this collector The call to this method is equivalent of calling toArray(true)
 EnvVarDescriptor[] toArray(boolean includeRemoved)
          Returns an array of variables held by this collector
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnvVarCollector

public EnvVarCollector()
Method Detail

add

public void add(IEnvironmentVariable[] vars)
adds an array of environment variables to the set of variables held by this collector performing environment variable operations

Parameters:
vars -

add

public void add(IEnvironmentVariable[] vars,
                IEnvironmentContextInfo info,
                int num,
                ICoreEnvironmentVariableSupplier supplier)

toArray

public EnvVarDescriptor[] toArray(boolean includeRemoved)
Returns an array of variables held by this collector

Parameters:
includeRemoved - true if removed variables should be included in the resulting array
Returns:
IBuildEnvironmentVariable[]

getVariable

public EnvVarDescriptor getVariable(java.lang.String name)
Returns a variable of a given name held by this collector

Parameters:
name - a variable name
Returns:
IBuildEnvironmentVariable

getVariables

public EnvVarDescriptor[] getVariables()
Returns an array of variables held by this collector The call to this method is equivalent of calling toArray(true)

Returns:
IBuildEnvironmentVariable[]

clear

public void clear()