コード例 #1
0
 /// <summary> Returns an IsotopeFactory instance.
 ///
 /// </summary>
 /// <param name="builder">                ChemObjectBuilder used to construct the Isotope's
 /// </param>
 /// <returns>                             The instance value
 /// </returns>
 /// <exception cref="IOException">            Description of the Exception
 /// </exception>
 /// <exception cref="OptionalDataException">  Description of the Exception
 /// </exception>
 /// <exception cref="ClassNotFoundException"> Description of the Exception
 /// </exception>
 public static IsotopeFactory getInstance(IChemObjectBuilder builder)
 {
     if (ifac == null)
     {
         ifac = new IsotopeFactory(builder);
     }
     return(ifac);
 }
コード例 #2
0
        //private IChemObjectBuilder builder;

        /// <summary>  Default constructor</summary>
        public SmilesGenerator(IChemObjectBuilder builder)
        {
            //this.builder = builder;
            try
            {
                isotopeFactory = IsotopeFactory.getInstance(builder);
            }
            catch (System.IO.IOException e)
            {
                SupportClass.WriteStackTrace(e, Console.Error);
            }
            //UPGRADE_NOTE: Exception 'java.lang.ClassNotFoundException' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
            catch (System.Exception e)
            {
                //UPGRADE_ISSUE: Method 'java.lang.ClassNotFoundException.printStackTrace' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javalangClassNotFoundExceptionprintStackTrace'"
                //e.printStackTrace();
            }
        }
コード例 #3
0
 /// <summary> Returns an IsotopeFactory instance.
 /// 
 /// </summary>
 /// <param name="builder">                ChemObjectBuilder used to construct the Isotope's
 /// </param>
 /// <returns>                             The instance value
 /// </returns>
 /// <exception cref="IOException">            Description of the Exception
 /// </exception>
 /// <exception cref="OptionalDataException">  Description of the Exception
 /// </exception>
 /// <exception cref="ClassNotFoundException"> Description of the Exception
 /// </exception>
 public static IsotopeFactory getInstance(IChemObjectBuilder builder)
 {
     if (ifac == null)
     {
         ifac = new IsotopeFactory(builder);
     }
     return ifac;
 }