/// <summary> /// This is used to instantiate the converter based on the type /// of the <c>Convert</c> annotation provided. If the type /// can not be instantiated for some reason then an exception is /// thrown from this method. /// </summary> /// <param name="convert"> /// this is the annotation containing the type /// </param> /// <returns> /// this returns an instance of the provided type /// </returns> public Converter GetInstance(Convert convert) { Class type = convert.value(); if(type.isInterface()) { throw new ConvertException("Can not instantiate %s", type); } return GetInstance(type); }
/// <summary> /// This is used to instantiate the converter based on the type /// of the <c>Convert</c> annotation provided. If the type /// can not be instantiated for some reason then an exception is /// thrown from this method. /// </summary> /// <param name="convert"> /// this is the annotation containing the type /// </param> /// <returns> /// this returns an instance of the provided type /// </returns> public Converter GetInstance(Convert convert) { Class type = convert.value(); if (type.isInterface()) { throw new ConvertException("Can not instantiate %s", type); } return(GetInstance(type)); }