本文整理了Java中java.lang.NoSuchFieldException.getLocalizedMessage()
方法的一些代码示例,展示了NoSuchFieldException.getLocalizedMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchFieldException.getLocalizedMessage()
方法的具体详情如下:
包路径:java.lang.NoSuchFieldException
类名称:NoSuchFieldException
方法名:getLocalizedMessage
暂无
代码示例来源:origin: geotools/geotools
/**
* Constructs the {@link PlanarImage} from the {@linkplain SerializableRenderedImage} after
* deserialization.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
/*
* Set the 'image' field using reflection, because this field is final.
* This is a legal usage for deserialization according Field.set(...)
* documentation in J2SE 1.5.
*/
final Field field = GridCoverage2D.class.getDeclaredField("image");
field.setAccessible(true);
field.set(this, PlanarImage.wrapRenderedImage(serializedImage));
} catch (NoSuchFieldException cause) {
InvalidClassException e = new InvalidClassException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
} catch (IllegalAccessException cause) {
InvalidObjectException e = new InvalidObjectException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
}
}
代码示例来源:origin: nailperry-zd/LazierTracker
private static void getClassFragmentActivity(Class clazz) {
while ((clazz != null) && (!clazz.equals(android.support.v4.app.FragmentActivity.class))) {
try {
fieldmFragments = clazz.getDeclaredField("mFragments");
} catch (NoSuchFieldException e) {
Log.e(EXCEPTION, e.getLocalizedMessage());
}
if (fieldmFragments != null) {
return;
}
clazz = clazz.getSuperclass();
}
}
代码示例来源:origin: ymex/banner
private void replaceViewPagerScroll() {
try {
Field field = ViewPager.class.getDeclaredField("mScroller");
field.setAccessible(true);
BannerScroller mScroller = new BannerScroller(getContext(), sInterpolator);
mScroller.setDuration(mScroller.mDuration);
field.set(this, mScroller);
} catch (IllegalAccessException e) {
e.printStackTrace();
System.err.println(e.getLocalizedMessage());
} catch (NoSuchFieldException e) {
e.printStackTrace();
System.err.println(e.getLocalizedMessage());
}
}
代码示例来源:origin: org.geotools/gt-coverage
/**
* Constructs the {@link PlanarImage} from the {@linkplain SerializableRenderedImage}
* after deserialization.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
/*
* Set the 'image' field using reflection, because this field is final.
* This is a legal usage for deserialization according Field.set(...)
* documentation in J2SE 1.5.
*/
final Field field = GridCoverage2D.class.getDeclaredField("image");
field.setAccessible(true);
field.set(this, PlanarImage.wrapRenderedImage(serializedImage));
} catch (NoSuchFieldException cause) {
InvalidClassException e = new InvalidClassException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
} catch (IllegalAccessException cause) {
InvalidObjectException e = new InvalidObjectException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
}
}
代码示例来源:origin: org.geotools/gt2-coverage
/**
* Constructs the {@link PlanarImage} from the {@linkplain SerializableRenderedImage}
* after deserialization.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
/*
* Set the 'image' field using reflection, because this field is final.
* This is a legal usage for deserialization according Field.set(...)
* documentation in J2SE 1.5.
*/
final Field field = GridCoverage2D.class.getDeclaredField("image");
field.setAccessible(true);
field.set(this, PlanarImage.wrapRenderedImage(serializedImage));
} catch (NoSuchFieldException cause) {
InvalidClassException e = new InvalidClassException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
} catch (IllegalAccessException cause) {
InvalidObjectException e = new InvalidObjectException(cause.getLocalizedMessage());
e.initCause(cause);
throw e;
}
}
代码示例来源:origin: Refinitiv/Elektron-SDK
fail(e.getLocalizedMessage());
内容来源于网络,如有侵权,请联系作者删除!