001 // Copyright 2007 Waterken Inc. under the terms of the MIT X license 002 // found at http://www.opensource.org/licenses/mit-license.html 003 package org.waterken.syntax; 004 005 import java.lang.reflect.Type; 006 007 /** 008 * A reference importer. 009 */ 010 public interface 011 Importer { 012 013 /** 014 * Imports a reference. 015 * @param href reference identifier 016 * @param base base URL, may be <code>null</code> 017 * @param type types implemented by the referenced object 018 * @return corresponding reference 019 * @throws Exception any problem connecting to the identified reference 020 */ 021 Object apply(String href, String base, Type... type) throws Exception; 022 }