com.threerings.antidote.field
Interface ReferenceField

All Superinterfaces:
Field, RequiresValidation
All Known Subinterfaces:
DescriptionAction, PackageInfoDependency, ValidationScript
All Known Implementing Classes:
AbstractTypeScript, Alternatives, Arch, BaseComponent, BaseDependency, BaseField, BaseTask, BaseTemplateScript, Blank, Condition, Conflict, Dependencies, Description, Dpkg, EnumTextField, EqualOrGreaterThan, EqualOrLesserThan, EqualTo, GreaterThan, HelloWorld, Info, LesserThan, ListComponent, ListField, ListTask, Maintainer, MaintainerEmail, MaintainerName, Name, Package, Paragraph, Path, Permission, Permissions, PostInst, PostRm, PreInst, PreRm, Priority, Replacement, Require, Scripts, Section, SimpleTextField, SingleLineTextField, Summary, TemplateScript, TextField, Verbatim, Version

public interface ReferenceField
extends Field

Indicates this Field object may be an Ant reference and provides methods for handling references.


Method Summary
 Object getReferencedField()
          Returns the Object that this ReferenceField holds a reference to.
 boolean isReference()
          Returns true if this Field is a reference, false otherwise.
 
Methods inherited from interface com.threerings.antidote.field.Field
getFieldName, getLocation
 
Methods inherited from interface com.threerings.antidote.RequiresValidation
validate
 

Method Detail

isReference

boolean isReference()
Returns true if this Field is a reference, false otherwise.


getReferencedField

Object getReferencedField()
Returns the Object that this ReferenceField holds a reference to. This is not type safe. Use FieldWrapper.getField() which is type safe. Should not be called before isReference() is checked. If the Reference has not been set, a UnsetReferenceException will be thrown.



Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.