本文整理了Java中java.lang.IllegalAccessException.printStackTrace()
方法的一些代码示例,展示了IllegalAccessException.printStackTrace()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IllegalAccessException.printStackTrace()
方法的具体详情如下:
包路径:java.lang.IllegalAccessException
类名称:IllegalAccessException
方法名:printStackTrace
暂无
代码示例来源:origin: libgdx/libgdx
public static GdxTest newTest (String testName) {
testName = originalToObfuscated.get(testName, testName);
try {
return forName(testName).newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
return null;
}
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByExampleSelective(@Param("record") Record record, @Param("example") Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByExampleSelective = mapper.getClass().getDeclaredMethod("updateByExampleSelective", record.getClass(), example.getClass());
Object result = updateByExampleSelective.invoke(mapper, record, example);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByExample(@Param("record") Record record, @Param("example") Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByExample = mapper.getClass().getDeclaredMethod("updateByExample", record.getClass(), example.getClass());
Object result = updateByExample.invoke(mapper, record, example);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByExampleWithBLOBs(@Param("record") Record record, @Param("example") Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("updateByExampleWithBLOBs", record.getClass(), example.getClass());
Object result = updateByExampleWithBLOBs.invoke(mapper, record, example);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByPrimaryKeyWithBLOBs(Record record) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByPrimaryKeyWithBLOBs = mapper.getClass().getDeclaredMethod("updateByPrimaryKeyWithBLOBs", record.getClass());
Object result = updateByPrimaryKeyWithBLOBs.invoke(mapper, record);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int deleteByPrimaryKey(Integer id) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method deleteByPrimaryKey = mapper.getClass().getDeclaredMethod("deleteByPrimaryKey", id.getClass());
Object result = deleteByPrimaryKey.invoke(mapper, id);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByPrimaryKeySelective(Record record) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByPrimaryKeySelective = mapper.getClass().getDeclaredMethod("updateByPrimaryKeySelective", record.getClass());
Object result = updateByPrimaryKeySelective.invoke(mapper, record);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int updateByPrimaryKey(Record record) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method updateByPrimaryKey = mapper.getClass().getDeclaredMethod("updateByPrimaryKey", record.getClass());
Object result = updateByPrimaryKey.invoke(mapper, record);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int insert(Record record) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method insert = mapper.getClass().getDeclaredMethod("insert", record.getClass());
Object result = insert.invoke(mapper, record);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int countByExample(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method countByExample = mapper.getClass().getDeclaredMethod("countByExample", example.getClass());
Object result = countByExample.invoke(mapper, example);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int deleteByExample(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method deleteByExample = mapper.getClass().getDeclaredMethod("deleteByExample", example.getClass());
Object result = deleteByExample.invoke(mapper, example);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public int insertSelective(Record record) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.MASTER.getName());
Method insertSelective = mapper.getClass().getDeclaredMethod("insertSelective", record.getClass());
Object result = insertSelective.invoke(mapper, record);
return Integer.parseInt(String.valueOf(result));
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return 0;
}
代码示例来源:origin: shuzheng/zheng
@Override
public Record selectByPrimaryKey(Integer id) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByPrimaryKey = mapper.getClass().getDeclaredMethod("selectByPrimaryKey", id.getClass());
Object result = selectByPrimaryKey.invoke(mapper, id);
return (Record) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExample(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
Object result = selectByExample.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public Record selectFirstByExampleWithBLOBs(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
List<Record> result = (List<Record>) selectByExampleWithBLOBs.invoke(mapper, example);
if (null != result && result.size() > 0) {
return result.get(0);
}
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExampleWithBLOBs(Example example) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
Object result = selectByExampleWithBLOBs.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExampleWithBLOBsForStartPage(Example example, Integer pageNum, Integer pageSize) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
PageHelper.startPage(pageNum, pageSize, false);
Object result = selectByExampleWithBLOBs.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExampleWithBLOBsForOffsetPage(Example example, Integer offset, Integer limit) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExampleWithBLOBs = mapper.getClass().getDeclaredMethod("selectByExampleWithBLOBs", example.getClass());
PageHelper.offsetPage(offset, limit, false);
Object result = selectByExampleWithBLOBs.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExampleForStartPage(Example example, Integer pageNum, Integer pageSize) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
PageHelper.startPage(pageNum, pageSize, false);
Object result = selectByExample.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
代码示例来源:origin: shuzheng/zheng
@Override
public List<Record> selectByExampleForOffsetPage(Example example, Integer offset, Integer limit) {
try {
DynamicDataSource.setDataSource(DataSourceEnum.SLAVE.getName());
Method selectByExample = mapper.getClass().getDeclaredMethod("selectByExample", example.getClass());
PageHelper.offsetPage(offset, limit, false);
Object result = selectByExample.invoke(mapper, example);
return (List<Record>) result;
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
DynamicDataSource.clearDataSource();
return null;
}
内容来源于网络,如有侵权,请联系作者删除!