Package org.eclipse.cdt.core.cdtvariables

## Class CdtVariable

- java.lang.Object
- - org.eclipse.cdt.core.cdtvariables.CdtVariable

All Implemented Interfaces:
  `ICdtVariable`

Direct Known Subclasses:
  `SupplierBasedCdtVariableSubstitutor.ResolvedMacro`

    public class CdtVariable
    extends Object
    implements ICdtVariable

This is the trivial implementation of the IBuildMacro used internaly by the MBS

Since:
  3.0

### Field Summary

Fields
`protected String` `fName`
`protected String[]` `fStringListValue`
`protected String` `fStringValue`
`protected int` `fType`

### Fields inherited from interface org.eclipse.cdt.core.cdtvariables.ICdtVariable

`VALUE_PATH_ANY, VALUE_PATH_ANY_LIST, VALUE_PATH_DIR, VALUE_PATH_DIR_LIST, VALUE_PATH_FILE, VALUE_PATH_FILE_LIST, VALUE_TEXT, VALUE_TEXT_LIST`

### Constructor Summary

Constructors
`protected` `CdtVariable()`
`` `CdtVariable​(String name, int type, String value)`
`` `CdtVariable​(String name, int type, String[] value)`
`` `CdtVariable​(ICdtVariable var)`

### Method Summary

All Methods Instance Methods Concrete Methods
`String` `getName()` Returns the macro name
`String[]` `getStringListValue()`
`String` `getStringValue()`
`int` `getValueType()`

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

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

### Field Detail

#### fName

    protected String fName

#### fType

    protected int fType

#### fStringValue

    protected String fStringValue

#### fStringListValue

    protected String[] fStringListValue

### Constructor Detail

#### CdtVariable

    protected CdtVariable()

#### CdtVariable

    public CdtVariable​(String name,
                       int type,
                       String value)

#### CdtVariable

    public CdtVariable​(String name,
                       int type,
                       String[] value)

#### CdtVariable

    public CdtVariable​(ICdtVariable var)

### Method Detail

#### getName

    public String getName()

Description copied from interface: `ICdtVariable`
Returns the macro name

Specified by:
  `getName` in interface `ICdtVariable`

#### getValueType

    public int getValueType()

Specified by:
  `getValueType` in interface `ICdtVariable`
Returns:
  IBuildMacro.VALUE_xxx

#### getStringValue

    public String getStringValue()
                          throws CdtVariableException

Specified by:
  `getStringValue` in interface `ICdtVariable`
Throws:
  `CdtVariableException` - if macro holds StringList-type value

#### getStringListValue

    public String[] getStringListValue()
                                throws CdtVariableException

Specified by:
  `getStringListValue` in interface `ICdtVariable`
Throws:
  `CdtVariableException` - if macro holds single String-type value