/* Generated by Together */

package cobalt.deployment.descriptor.dist;

import cobalt.deployment.descriptor.EjbReferenceDescriptor;
import cobalt.deployment.descriptor.ResourceReferenceDescriptor;

public class Jeus30ReferenceDescriptor {
    public Jeus30ReferenceDescriptor(Object refObject) {
        this.refObject = refObject;
        exportName = getReferenceName() + "value";
    }
    public Object getRefObject(){ return refObject; }

    public void setRefObject(Object refObject){ this.refObject = refObject; }

    public String getExportName(){ return exportName; }

    public void setExportName(String exportName){ this.exportName = exportName; }

    public String getReferenceName() {
        if ( refObject instanceof EjbReferenceDescriptor )
            return ((EjbReferenceDescriptor)refObject).getName();
        else if ( refObject instanceof ResourceReferenceDescriptor )
            return ((ResourceReferenceDescriptor)refObject).getName();
        return null;
    }

    private Object refObject;
    private String exportName;
}
