本文整理了Java中com.wizzardo.tools.misc.Unchecked.rethrow()
方法的一些代码示例,展示了Unchecked.rethrow()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unchecked.rethrow()
方法的具体详情如下:
包路径:com.wizzardo.tools.misc.Unchecked
类名称:Unchecked
方法名:rethrow
暂无
代码示例来源:origin: com.wizzardo.tools/tools-evaluation
@Override
public void set(Object instance, Object value) {
try {
method.invoke(instance, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
} catch (InvocationTargetException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-evaluation
@Override
public Object get(Object instance) {
try {
return method.invoke(instance);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
} catch (InvocationTargetException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-evaluation
protected <T> T creteInstance(Class<T> clazz) {
T t;
try {
t = clazz.newInstance();
} catch (InstantiationException e) {
throw Unchecked.rethrow(e);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
return t;
}
代码示例来源:origin: wizzardo/tools
@Override
public void set(Object instance, Object value) {
try {
method.invoke(instance, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
} catch (InvocationTargetException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public int getInteger(Object object) {
try {
return field.getInt(object);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public void setObject(Object object, Object value) {
try {
field.set(object, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public Object getObject(Object object) {
try {
return field.get(object);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-evaluation
@Override
public void set(Object instance, Object value) {
try {
field.set(instance, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public long getLong(Object object) {
try {
return field.getLong(object);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public void setInteger(Object object, int value) {
try {
field.setInt(object, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-evaluation
private static Collection createNewCollection(Collection c) {
try {
Collection l = c.getClass().newInstance();
l.addAll(c);
return l;
} catch (InstantiationException e) {
throw Unchecked.rethrow(e);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public float getFloat(Object object) {
try {
return field.getFloat(object);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public void setShort(Object object, short value) {
try {
field.setShort(object, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-security
public void asBytes(byte[] bytes, int offset) {
try {
hash.digest(bytes, offset, hash.getDigestLength());
} catch (DigestException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public void setByte(Object object, byte value) {
try {
field.setByte(object, value);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-reflection
@Override
public byte getByte(Object object) {
try {
return field.getByte(object);
} catch (IllegalAccessException e) {
throw Unchecked.rethrow(e);
}
}
}
代码示例来源:origin: com.wizzardo.tools/tools-http
public List<Cookie> getCookies(String url) {
try {
return getCookies(new URL(url));
} catch (MalformedURLException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: com.wizzardo.tools/tools-collections
@Override
public void process(B b) {
try {
if (blocking)
output.put(b);
notifyIfWaiting();
} catch (InterruptedException e) {
throw Unchecked.rethrow(e);
}
}
代码示例来源:origin: wizzardo/tools
protected A take() {
try {
return input.take();
} catch (InterruptedException e) {
throw Unchecked.rethrow(e);
} finally {
notifyIfWaiting();
}
}
代码示例来源:origin: com.wizzardo/epoll
private static FieldReflection getByteBufferAddressReflection() {
try {
return new FieldReflectionFactory().create(Buffer.class, "address", true);
} catch (NoSuchFieldException e) {
throw Unchecked.rethrow(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!