Android Open Source - pdsql Generic Base






From Project

Back to project page pdsql.

License

The source code is released under:

Apache License

If you think the Android project pdsql listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.piscessera.pdsql;
// w w  w . j ava2s . co m

public class GenericBase<T> {
  private String className;

  public GenericBase(String className) {
    this.className = className;
  }

  @SuppressWarnings("unchecked")
  protected T newInstance() {
    try {
      // Create class
      Class<? extends T> cls = (Class<? extends T>) Class
          .forName(this.className);
      // Create instance
      T d = cls.newInstance();
      return d;
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    } catch (InstantiationException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    }
    return null;
  }
}




Java Source Code List

com.piscessera.pdsql.DatabaseContentValuesUtil.java
com.piscessera.pdsql.DatabaseCore.java
com.piscessera.pdsql.DatabaseCursorUtil.java
com.piscessera.pdsql.Dsql.java
com.piscessera.pdsql.GenericBase.java
com.piscessera.pdsql.utils.ApplicationUtil.java
com.piscessera.pdsql.utils.DateUtil.java
com.piscessera.pdsql.utils.DebugUtil.java
com.piscessera.pdsql.utils.FileUtil.java