Java 类java.lang.ClassNotFoundException 实例源码

项目:OSWf-OSWorkflow-fork    文件:HibernatePersistentVars.java   
private Object decodeObject(String base64String) throws PersistentVarsException {

    Object object = null;

    try {
        byte[] bytes = Base64.getInstance().decode(base64String);

        InputStream inputStream = new ByteArrayInputStream(bytes);
        ObjectInputStream objectStream = new ObjectInputStream(inputStream);
        object = objectStream.readObject();
        objectStream.close();
        inputStream.close();
    } catch (ClassNotFoundException classNotFoundException) {
        throw new PersistentVarsException(classNotFoundException.getMessage());
    } catch (IOException ioException) {
        throw new PersistentVarsException(ioException.getMessage());
    }

    return object;
}
项目:jdk8u-jdk    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:openjdk-jdk10    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        loader.defineClass("BadParams", BadParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:openjdk9    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        loader.defineClass("BadParams", BadParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:gemfirexd-oss    文件:RunList.java   
/**
* RunList
* suitesToRun: a Vector of suites from RunSuite
* outDir: The output directory for the suite(s)
* pwOut: The output for writing suite and test results
* suiteProperties: From RunSuite for the top suite
* (individual suites in the vector may have their own
* properties which must also be located and applied)
*/

public RunList(Vector suitesToRun, 
    File runDir, File outDir, PrintWriter pwOut,
    Properties suiteProperties, 
    Properties specialProperties, 
    String topParentSuite)
    throws ClassNotFoundException, IOException, Exception
{
    this.runDir = runDir;
    this.outDir = outDir;
    this.pwOut = pwOut;
    this.suiteProperties = suiteProperties; // usual suite props
    this.specialProperties = specialProperties; // for special test Flags
    this.topSuiteName = suiteProperties.getProperty("suitename");
    //System.out.println("----------------------------------------");
    //System.out.println("RunList topSuiteName= " + topSuiteName);
    this.topParentSuite = topParentSuite;
    //System.out.println("topParentSuite= " + topParentSuite);

    // Run the suites
    runSuites(suitesToRun);
}
项目:gemfirexd-oss    文件:RunTest.java   
static void verifyTestType()
      throws ClassNotFoundException, FileNotFoundException, IOException
  {
      //java requires '/' as separator to look into jar, irrespective of OS
      InputStream is =
          loadTestResource("harness/testtypes.properties");
Properties p = new Properties();
p.load(is);
      String testtypes = p.getProperty("testtypes");
   StringTokenizer st = new StringTokenizer(testtypes,",");
   String ttype = "";
      while (st.hasMoreTokens())
      {
          ttype = st.nextToken();
          if ( testType.equals(ttype) )
              return;
      }
      // Not a known test type
      System.out.println("Unknown test type: " + testType);
      System.exit(1);
  }
项目:jdk8u_jdk    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:frank    文件:Learning.java   
public Learning()
{
  jmhal = new JMegaHal();
  // Reload brain from disk.
  try
  {
    FileInputStream fis = new FileInputStream(brainFile);
    ObjectInputStream ois = new ObjectInputStream(fis);
    Object object = ois.readObject();
    if(object instanceof JMegaHal)
      jmhal = (JMegaHal)object;
  }
  catch(ClassNotFoundException cnfe)
  {
    System.out.println("> Warning: Class not found: " + cnfe.toString());
  }
  catch(FileNotFoundException fnfe)
  {
    System.out.println("> Warning: Unable to open brain.dat: " + fnfe.toString());
  }
  catch(IOException ioe)
  {
    System.out.println("> Warning: Unable to open brain.dat: " + ioe.toString());
  }
}
项目:lookaside_java-1.8.0-openjdk    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:openxal    文件:AcceleratorNodeFactory.java   
/** 
   * Creates the node with the specified node id and fully qualified node type.
* @param nodeID device ID
* @param nodeType fully qualified node type (e.g. deviceType.softType)
   */
  private AcceleratorNode createNode( final String nodeID, final String nodeType ) throws ClassNotFoundException {
      // Check if this node type is known; if not then substitute a generic node
      if ( !_constructors.containsKey( nodeType ) ) {
    final String message = "Unknown AcceleratorNode type : \"" + nodeType + "\" for ID: " + nodeID + ".  Will substitute a GenericNode!";
          System.err.println( message );
    Logger.getLogger("global").log( Level.WARNING, message );
          final AcceleratorNode node = new GenericNode( nodeType, nodeID, CHANNEL_FACTORY );
          _classTable.put( nodeType, GenericNode.class );
          return node;
      }

      final Constructor<?> constructor = _constructors.get( nodeType );
//TODO: need to account for custom channel factory
      final Object[] args = new Object[] { nodeID, CHANNEL_FACTORY };

      try {
          return (AcceleratorNode)constructor.newInstance( args );
      } 
catch (Throwable exception)   {
           throw new ClassNotFoundException( "Unknown AcceleratorNode type : " + nodeType );
      }
  }
项目:strusJavaApi    文件:JacksonTest.java   
@Test
public void mixinCreateTest2( ) throws JsonProcessingException, ClassNotFoundException, IOException {
    Expression expression = 
        new Expression( "contains", 0, 0 )
            .addExpression( 
                new Expression( "contains", 0, 0 )
                    .addTerm( "word", "aword0" )
                    .addTerm( "word", "aword1" ) )
            .addTerm( "word", "aword2" );
    ExpressionFeature f = new ExpressionFeature( "feat", expression, 1.0f );
    StrusJsonObjectMapper mapperFactory = new StrusJsonObjectMapper( );
    ObjectMapper mapper = mapperFactory.getObjectMapper( );
    String s = mapper.writeValueAsString( f );
    LOGGER.fine( s );
    Object o = mapper.readValue( s, ExpressionFeature.class );
    LOGGER.fine( o.toString( ) );
    printNode( ((ExpressionFeature)o).expression, 1 );
}
项目:gemfirexd-oss    文件:RunList.java   
/**
* RunList
* suitesToRun: a Vector of suites from RunSuite
* outDir: The output directory for the suite(s)
* pwOut: The output for writing suite and test results
* suiteProperties: From RunSuite for the top suite
* (individual suites in the vector may have their own
* properties which must also be located and applied)
*/

public RunList(Vector suitesToRun, 
    File runDir, File outDir, PrintWriter pwOut,
    Properties suiteProperties, 
    Properties specialProperties, 
    String topParentSuite)
    throws ClassNotFoundException, IOException, Exception
{
    this.runDir = runDir;
    this.outDir = outDir;
    this.pwOut = pwOut;
    this.suiteProperties = suiteProperties; // usual suite props
    this.specialProperties = specialProperties; // for special test Flags
    this.topSuiteName = suiteProperties.getProperty("suitename");
    //System.out.println("----------------------------------------");
    //System.out.println("RunList topSuiteName= " + topSuiteName);
    this.topParentSuite = topParentSuite;
    //System.out.println("topParentSuite= " + topParentSuite);

    // Run the suites
    runSuites(suitesToRun);
}
项目:gemfirexd-oss    文件:RunTest.java   
static void verifyTestType()
      throws ClassNotFoundException, FileNotFoundException, IOException
  {
      //java requires '/' as separator to look into jar, irrespective of OS
      InputStream is =
          loadTestResource("harness/testtypes.properties");
Properties p = new Properties();
p.load(is);
      String testtypes = p.getProperty("testtypes");
   StringTokenizer st = new StringTokenizer(testtypes,",");
   String ttype = "";
      while (st.hasMoreTokens())
      {
          ttype = st.nextToken();
          if ( testType.equals(ttype) )
              return;
      }
      // Not a known test type
      System.out.println("Unknown test type: " + testType);
      System.exit(1);
  }
项目:galago-git    文件:AnnotationsGenerateFn.java   
private void initClassifier (PrintStream output) {

    try {
      classifier = CRFClassifier.getClassifier (serializedClassifier);
    }
    catch (ClassNotFoundException cnfe) {
      output.println ("Class not found exception initializing NER extractions.");
      output.println ("Exception: " + cnfe.toString ());
      System.exit (1);
    }
    catch (IOException ioex) {
      output.println ("Exception in initClassifier");
      output.println ("Exception: " + ioex.toString ());
      System.exit (1);
    }
  }
项目:openxal    文件:AcceleratorNodeFactory.java   
/** 
   * Creates the node with the specified node id and fully qualified node type.
* @param nodeID device ID
* @param nodeType fully qualified node type (e.g. deviceType.softType)
   */
  private AcceleratorNode createNode( final String nodeID, final String nodeType ) throws ClassNotFoundException {
      // Check if this node type is known; if not then substitute a generic node
      if ( !_constructors.containsKey( nodeType ) ) {
    final String message = "Unknown AcceleratorNode type : \"" + nodeType + "\" for ID: " + nodeID + ".  Will substitute a GenericNode!";
          System.err.println( message );
    Logger.getLogger("global").log( Level.WARNING, message );
          final AcceleratorNode node = new GenericNode( nodeType, nodeID, CHANNEL_FACTORY );
          _classTable.put( nodeType, GenericNode.class );
          return node;
      }

      final Constructor<?> constructor = _constructors.get( nodeType );
//TODO: need to account for custom channel factory
      final Object[] args = new Object[] { nodeID, CHANNEL_FACTORY };

      try {
          return (AcceleratorNode)constructor.newInstance( args );
      } 
catch (Throwable exception)   {
           throw new ClassNotFoundException( "Unknown AcceleratorNode type : " + nodeType );
      }
  }
项目:infobip-open-jdk-8    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:jdk8u-dev-jdk    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:Openfire    文件:JerseyWrapper.java   
public static String loadAuthenticationFilter() {

    // Check if custom AuthFilter is available
    String customAuthFilterClassName = JiveGlobals.getProperty(CUSTOM_AUTH_PROPERTY_NAME);
    String restAuthType = JiveGlobals.getProperty(REST_AUTH_TYPE);
    String pickedAuthFilter = AUTHFILTER;

    try {
        if(customAuthFilterClassName != null && "custom".equals(restAuthType)) {
            Class.forName(customAuthFilterClassName, false, JerseyWrapper.class.getClassLoader());
            pickedAuthFilter = customAuthFilterClassName;
            loadingStatusMessage = null;
        }
    } catch (ClassNotFoundException e) {
        loadingStatusMessage = "No custom auth filter found for restAPI plugin! " + customAuthFilterClassName + " " + restAuthType;
    }

    prc.getProperties().put(CONTAINER_REQUEST_FILTERS, pickedAuthFilter);   
    return loadingStatusMessage;
}
项目:OLD-OpenJDK8    文件:BadClassFiles.java   
private BadClassFiles() throws ClassNotFoundException {
    classes = new Class<?>[] {
        loader.defineClass("EmptyName", EmptyName_bytes),
        loader.defineClass("BadModifiers", BadModifiers_bytes),
        loader.defineClass("BadNameIndex", BadNameIndex_bytes),
        loader.defineClass("NameIndexOutOfBounds", NameIndexOutOfBounds_bytes),
        loader.defineClass("ExtraParams", ExtraParams_bytes),
        // Name with .
        loader.defineClass("BadName1", BadName1_bytes),
        // Name with [
        loader.defineClass("BadName2", BadName2_bytes),
        // Name with ;
        loader.defineClass("BadName3", BadName3_bytes),
        // Name with /
        loader.defineClass("BadName4", BadName4_bytes)
    };
}
项目:amp-java    文件:AMPBox.java   
private List<Class> getListTypes(Field fld) {
List<Class> listVals = new ArrayList<Class>();
if (fld != null &&
    (fld.getType() == List.class || fld.getType() == ArrayList.class)) {
    ParameterizedType pt = (ParameterizedType) fld.getGenericType();
    for (Type type: pt.getActualTypeArguments()) {
    if (type instanceof Class) {
        // Single dimensional ListOf
        listVals.add((Class) type);
    } else {
        // Multidimensional ListOf
        //listVals.add((new ArrayList<Object>()).getClass());
        for (String sub: type.toString().split("<"))
        if (sub.indexOf("List") > 5)
            listVals.add((new ArrayList<Object>()).getClass());
        else try {
            String cn = sub.substring(0, sub.indexOf(">"));
            listVals.add(Class.forName(cn));
            } catch (ClassNotFoundException cnf) {
            throw new Error ("Class not found: '"+sub+"'");
            }
    }
    }
}
return listVals;
   }
项目:align-api-project    文件:AServProtocolManager.java   
/**
    * Display all the classes inheriting or implementing a given
    * interface in the currently loaded packages.
    * @param interfaceName the name of the interface to implement
    */
   public static Set<String> implementations( String interfaceName ) {
Set<String> list = new HashSet<String>();
try {
    Class toclass = Class.forName(interfaceName);
    //Package [] pcks = Package.getPackages();
    //for (int i=0;i<pcks.length;i++) {
    //logger.trace(interfaceName+ ">> "+pcks[i].getName() );
    //implementations( pcks[i].getName(), toclass, list );
    //}
    implementations( toclass, list );
} catch (ClassNotFoundException ex) {
    logger.debug( "IGNORED Class {} not found!", interfaceName );
}
return list;
   }
项目:renjin-statet    文件:Native.java   
private static Class getPackageClass(String packageName) {
  Class packageClass;
  if(packageName == null || packageName.equals("base")) {
    packageClass = Base.class;
  } else if(packageName.equals("methods")) {
    packageClass = Methods.class;
  } else if(packageName.equals("grDevices")) {
    packageClass = Graphics.class;
  } else {
    String packageClassName = "org.renjin." + packageName + "." +
        packageName.substring(0, 1).toUpperCase() + packageName.substring(1);
    try {
      packageClass = Class.forName(packageClassName);
    } catch (ClassNotFoundException e) {
      throw new EvalException("Could not find class for 'native' methods for package '%s' (className='%s')",
          packageName, packageClassName);
    }
  }
  return packageClass;
}
项目:spliceengine    文件:RunList.java   
/**
* RunList
* suitesToRun: a Vector of suites from RunSuite
* outDir: The output directory for the suite(s)
* pwOut: The output for writing suite and test results
* suiteProperties: From RunSuite for the top suite
* (individual suites in the vector may have their own
* properties which must also be located and applied)
*/

public RunList(Vector suitesToRun, 
    File runDir, File outDir, PrintWriter pwOut,
    Properties suiteProperties, 
    Properties specialProperties, 
    String topParentSuite)
    throws ClassNotFoundException, IOException, Exception
{
    this.runDir = runDir;
    this.outDir = outDir;
    this.pwOut = pwOut;
    this.suiteProperties = suiteProperties; // usual suite props
    this.specialProperties = specialProperties; // for special test Flags
    this.topSuiteName = suiteProperties.getProperty("suitename");
    //System.out.println("----------------------------------------");
    //System.out.println("RunList topSuiteName= " + topSuiteName);
    this.topParentSuite = topParentSuite;
    //System.out.println("topParentSuite= " + topParentSuite);

    // Run the suites
    runSuites(suitesToRun);
}
项目:JRediClients    文件:UserEntity.java   
/** depth clone **/
public Object clone() {
    try {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(bos);
        oos.writeObject(this);
        ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray());
        ObjectInputStream ois = new ObjectInputStream(bis);
        return ois.readObject();
    } catch (IOException | ClassNotFoundException e) {
        e.printStackTrace();
        return null;
    }
}
项目:monarch    文件:RegionEventImpl.java   
/**
 * Reads the contents of this message from the given input.
 */
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.regionPath = DataSerializer.readString(in);
  this.callbackArgument = DataSerializer.readObject(in);
  this.op = Operation.fromOrdinal(in.readByte());
  this.originRemote = in.readBoolean();
  this.distributedMember = DSFIDFactory.readInternalDistributedMember(in);
}
项目:ditb    文件:ChecksumFactory.java   
/**
 * Create a new instance of a Checksum object.
 * @return The newly created Checksum object
 */
static public Checksum newInstance(String className) throws IOException {
  try {
    Class<?> clazz = getClassByName(className);
    return (Checksum)newInstance(clazz);
  } catch (ClassNotFoundException e) {
    throw new IOException(e);
  }
}
项目:gemfirexd-oss    文件:RunSuite.java   
static void BuildSuitesVector(String parent, String subsuites)
    throws ClassNotFoundException, IOException
{
    Properties p;
    StringTokenizer st = new StringTokenizer(subsuites);
    String child = "";
    while (st.hasMoreTokens())
    {
        child = st.nextToken();
        if (child.equals(parent))
        {
            suitesToRun.addElement(parent+":"+child);
            //System.out.println("Add this: " + parent+":"+child);
        }
        else
        {
            p = getSuiteProperties(child, false);
            if ( p.getProperty("suites") == null )
            {
                suitesToRun.addElement(parent+":"+child);
                //System.out.println("Add this: " + parent+":"+child);
            }
            else
            {
                String moresuites = p.getProperty("suites");
                BuildSuitesVector(child, moresuites);
            }
        }
    }
}
项目:gemfirexd-oss    文件:RegionEventImpl.java   
/**
 * Reads the contents of this message from the given input.
 */
public void fromData(DataInput in) throws IOException, ClassNotFoundException
{
  this.regionPath = DataSerializer.readString(in);
  this.callbackArgument = DataSerializer.readObject(in);
  this.op = Operation.fromOrdinal(in.readByte());
  this.originRemote = in.readBoolean();
  this.distributedMember = DSFIDFactory.readInternalDistributedMember(in);
  this.diskException = DataSerializer.readObject(in);
}
项目:openxal    文件:AcceleratorNodeFactory.java   
/** create an accelerator node based on a DataAdaptor */
  public AcceleratorNode createNode( final DataAdaptor adaptor ) throws ClassNotFoundException {
      final String nodeID = adaptor.stringValue( "id" );
      final String deviceType = adaptor.stringValue( "type" );
final String softType = adaptor.hasAttribute( "softType" ) ? adaptor.stringValue( "softType" ) : null;
final String nodeType = softType != null ? deviceType + "." + softType : deviceType;

      return createNode( nodeID, nodeType );
  }
项目:LCIndex-HBase-0.94.16    文件:ChecksumFactory.java   
/**
 * Create a new instance of a Checksum object.
 * @return The newly created Checksum object
 */
static public Checksum newInstance(String className) throws IOException {
  try {
    Class<?> clazz = getClassByName(className);
    return (Checksum)newInstance(clazz);
  } catch (ClassNotFoundException e) {
    throw new IOException(e);
  }
}
项目:strusJavaApi    文件:JacksonTest.java   
@Test
public void mixinCreateTest1( ) throws JsonProcessingException, ClassNotFoundException, IOException {
    TermFeature f = new TermFeature( "feat", 1.0f, "word", "aword0" );
    StrusJsonObjectMapper mapperFactory = new StrusJsonObjectMapper( );
    ObjectMapper mapper = mapperFactory.getObjectMapper( );
    String s = mapper.writeValueAsString( f );
    LOGGER.fine( s );
    Object o = mapper.readValue( s, TermFeature.class );
    LOGGER.fine( o.toString( ) );
    LOGGER.fine( (((TermFeature)o).term).toString( ) );
    printNode( ((TermFeature)o).term, 0 );
}
项目:giv-planner    文件:Test33.java   
/**
 * Override readObject.
 */
private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    // initialize our transient field
    digitList = new DigitList();
}
项目:gemfirexd-oss    文件:RunSuite.java   
static void BuildSuitesVector(String parent, String subsuites)
    throws ClassNotFoundException, IOException
{
    Properties p;
    StringTokenizer st = new StringTokenizer(subsuites);
    String child = "";
    while (st.hasMoreTokens())
    {
        child = st.nextToken();
        if (child.equals(parent))
        {
            suitesToRun.addElement(parent+":"+child);
            //System.out.println("Add this: " + parent+":"+child);
        }
        else
        {
            p = getSuiteProperties(child, false);
            if ( p.getProperty("suites") == null )
            {
                suitesToRun.addElement(parent+":"+child);
                //System.out.println("Add this: " + parent+":"+child);
            }
            else
            {
                String moresuites = p.getProperty("suites");
                BuildSuitesVector(child, moresuites);
            }
        }
    }
}
项目:gemfirexd-oss    文件:RegionEventImpl.java   
/**
 * Reads the contents of this message from the given input.
 */
public void fromData(DataInput in) throws IOException, ClassNotFoundException
{
  this.regionPath = DataSerializer.readString(in);
  this.callbackArgument = DataSerializer.readObject(in);
  this.op = Operation.fromOrdinal(in.readByte());
  this.originRemote = in.readBoolean();
  this.distributedMember = DSFIDFactory.readInternalDistributedMember(in);
  this.diskException = DataSerializer.readObject(in);
}
项目:pbase    文件:ChecksumFactory.java   
/**
 * Create a new instance of a Checksum object.
 * @return The newly created Checksum object
 */
static public Checksum newInstance(String className) throws IOException {
  try {
    Class<?> clazz = getClassByName(className);
    return (Checksum)newInstance(clazz);
  } catch (ClassNotFoundException e) {
    throw new IOException(e);
  }
}
项目:HIndex    文件:ChecksumFactory.java   
/**
 * Create a new instance of a Checksum object.
 * @return The newly created Checksum object
 */
static public Checksum newInstance(String className) throws IOException {
  try {
    Class<?> clazz = getClassByName(className);
    return (Checksum)newInstance(clazz);
  } catch (ClassNotFoundException e) {
    throw new IOException(e);
  }
}
项目:openxal    文件:AcceleratorNodeFactory.java   
/** create an accelerator node based on a DataAdaptor */
  public AcceleratorNode createNode( final DataAdaptor adaptor ) throws ClassNotFoundException {
      final String nodeID = adaptor.stringValue( "id" );
      final String deviceType = adaptor.stringValue( "type" );
final String softType = adaptor.hasAttribute( "softType" ) ? adaptor.stringValue( "softType" ) : null;
final String nodeType = softType != null ? deviceType + "." + softType : deviceType;

      return createNode( nodeID, nodeType );
  }
项目:SteakGUI    文件:MenuListener.java   
/**
 * Registers the events of the {@link ninja.amp.ampmenus.MenuListener} to a plugin.
 *
 * @param plugin The plugin used to register the events.
 */
public void register(JavaPlugin plugin) {
    if (!isRegistered(plugin)) {
        plugin.getServer().getPluginManager().registerEvents(INSTANCE, plugin);
        try {
            Class.forName("org.bukkit.event.inventory.InventoryDragEvent");
            plugin.getServer().getPluginManager().registerEvents(new DragListener(), plugin);
        } catch (ClassNotFoundException e) {
            System.out.println("InventoryDragEvent not founded");
        }
        this.plugin = plugin;
    }
}
项目:IRIndex    文件:ChecksumFactory.java   
/**
 * Create a new instance of a Checksum object.
 * @return The newly created Checksum object
 */
static public Checksum newInstance(String className) throws IOException {
  try {
    Class<?> clazz = getClassByName(className);
    return (Checksum)newInstance(clazz);
  } catch (ClassNotFoundException e) {
    throw new IOException(e);
  }
}
项目:Openfire    文件:JerseyWrapper.java   
public static String tryLoadingAuthenticationFilter(String customAuthFilterClassName) {

    try {
        if(customAuthFilterClassName != null) {
            Class.forName(customAuthFilterClassName, false, JerseyWrapper.class.getClassLoader());
            loadingStatusMessage = null;
        }
    } catch (ClassNotFoundException e) {
        loadingStatusMessage = "No custom auth filter found for restAPI plugin with name " + customAuthFilterClassName;
    }

    if(customAuthFilterClassName == null || customAuthFilterClassName.isEmpty())
        loadingStatusMessage = "Classname field can't be empty!";
    return loadingStatusMessage;
}