public class TranslationUnit extends Object
| Constructor and Description |
|---|
TranslationUnit()
Creates a TU w/o an source or target defined
|
TranslationUnit(TranslationUnitVariant source,
TranslationUnitVariant target)
Creates a TU with the provided source and targets
|
| Modifier and Type | Method and Description |
|---|---|
Metadata |
getMetadata()
Gets the metadata or attributes for this TU
|
String |
getMetadataValue(MetadataType key)
Gets the value for a give metadata value field
|
TranslationUnitVariant |
getSource() |
TranslationUnitVariant |
getTarget() |
boolean |
isSourceEmpty()
Checks to see if the the source is empty
|
boolean |
isTargetEmpty()
Checks to see if the the target is empty
|
void |
setMetadata(Metadata metadata) |
void |
setMetadataValue(MetadataType key,
String value)
Sets the value for a give metadata value field
|
void |
setSource(TranslationUnitVariant source) |
void |
setTarget(TranslationUnitVariant target) |
String |
toString() |
public TranslationUnit()
public TranslationUnit(TranslationUnitVariant source, TranslationUnitVariant target)
source - The source of the TUtarget - The target of the TUpublic Metadata getMetadata()
public void setMetadata(Metadata metadata)
public TranslationUnitVariant getSource()
public TranslationUnitVariant getTarget()
public void setSource(TranslationUnitVariant source)
public void setTarget(TranslationUnitVariant target)
public boolean isSourceEmpty()
public void setMetadataValue(MetadataType key, String value)
key - the key for the data we want setvalue - the vlaue to set the metadata topublic boolean isTargetEmpty()
public String getMetadataValue(MetadataType key)
key - the key for the data we wantCopyright © 2019. All rights reserved.