本文整理汇总了Java中java.beans.IntrospectionException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java IntrospectionException.printStackTrace方法的具体用法?Java IntrospectionException.printStackTrace怎么用?Java IntrospectionException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.beans.IntrospectionException
的用法示例。
在下文中一共展示了IntrospectionException.printStackTrace方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setVisible
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
public void setVisible(boolean visible) {
// TODO Auto-generated method stub
super.setVisible(visible);
if (visible) {
ComponentExplorerWizardPage objectExplorerWizardPage = (ComponentExplorerWizardPage) this.getPreviousPage();
try {
Object o = objectExplorerWizardPage.getCreatedBean();
if (o instanceof AbstractCouchDbTransaction) {
AbstractCouchDbTransaction dbo = (AbstractCouchDbTransaction) objectExplorerWizardPage.getCreatedBean();
if (dbo != null && couchVariablesComposite != null){
couchVariablesComposite.setPropertyDescriptor(dbo, CachedIntrospector.getBeanInfo(dbo).getPropertyDescriptors(),
(DatabaseObject) parentObject);
}
}
} catch (IntrospectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
示例2: setVisible
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
public void setVisible(boolean visible) {
// TODO Auto-generated method stub
super.setVisible(visible);
if (visible) {
ObjectExplorerWizardPage objectExplorerWizardPage = (ObjectExplorerWizardPage) this.getPreviousPage();
try {
Object o = objectExplorerWizardPage.getCreatedBean();
if (o instanceof AbstractCouchDbTransaction) {
AbstractCouchDbTransaction dbo = (AbstractCouchDbTransaction) objectExplorerWizardPage.getCreatedBean();
if (dbo != null && couchVariablesComposite != null){
couchVariablesComposite.setPropertyDescriptor(dbo, CachedIntrospector.getBeanInfo(dbo).getPropertyDescriptors(),
(DatabaseObject) parentObject);
}
}
} catch (IntrospectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
示例3: ObjectWrapper
import java.beans.IntrospectionException; //导入方法依赖的package包/类
public ObjectWrapper(T wrapped, SimulationModel simModel, boolean doSerialize) {
super(wrapped, simModel, doSerialize);
List<Property> properties = new ArrayList<>();
try {
Arrays.stream(Introspector.getBeanInfo(wrappedClass).getPropertyDescriptors())
.filter(propertyDescriptor -> !propertyDescriptor.getName().equalsIgnoreCase("class"))
.filter(propertyDescriptor -> propertyDescriptorMethod(propertyDescriptor) != null)
.filter(propertyDescriptor -> !hasAnnotation(propertyDescriptorMethod(propertyDescriptor), IgnoreProperty.class))
.filter(propertyDescriptor -> !hasAnnotation(propertyDescriptorMethod(propertyDescriptor), JsonIgnore.class))
.filter(propertyDescriptor -> !propertyDescriptor.getName().toLowerCase().endsWith("dimension"))
.forEach(propertyDescriptor -> properties.add(makeProperty(wrapped, propertyDescriptor)));
for (Property p : properties) {
if (p.isValueProperty()) {
valueProps.add(p);
} else {
childProps.add(p);
}
}
} catch (IntrospectionException e) {
e.printStackTrace();
}
}
示例4: create
import java.beans.IntrospectionException; //导入方法依赖的package包/类
private static PropertyDescriptor create(PropertyDescriptor pd) {
try {
if (pd instanceof IndexedPropertyDescriptor) {
IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd;
return new IndexedPropertyDescriptor(
ipd.getName(),
ipd.getReadMethod(),
ipd.getWriteMethod(),
ipd.getIndexedReadMethod(),
ipd.getIndexedWriteMethod());
} else {
return new PropertyDescriptor(
pd.getName(),
pd.getReadMethod(),
pd.getWriteMethod());
}
}
catch (IntrospectionException exception) {
exception.printStackTrace();
return null;
}
}
示例5: getEventSetDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
public EventSetDescriptor[] getEventSetDescriptors() {
EventSetDescriptor[] es = new EventSetDescriptor[2];
try {
es[iAction] = new EventSetDescriptor(
TestClass.class,
"actionListener",
java.awt.event.ActionListener.class,
new String[] {"actionPerformed"},
"addActionListener",
"removeActionListener");
es[iMouse] = new EventSetDescriptor(
TestClass.class,
"mouseListener",
java.awt.event.MouseListener.class,
new String[] {"mouseClicked", "mousePressed", "mouseReleased", "mouseEntered", "mouseExited"},
"addMouseListener",
"removeMouseListener");
} catch(IntrospectionException e) {
e.printStackTrace();
}
return es;
}
示例6: getPropertyDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
public PropertyDescriptor[] getPropertyDescriptors() {
PropertyDescriptor[] p = new PropertyDescriptor[1];
try {
p[0] = new PropertyDescriptor ("x", Base.class, "getX", null);
p[0].setShortDescription("BASEPROPERTY");
p[0].setBound (baseFlag);
p[0].setExpert(baseFlag);
p[0].setHidden(baseFlag);
p[0].setPreferred(baseFlag);
p[0].setValue("required", baseFlag);
p[0].setValue("visualUpdate", baseFlag);
p[0].setValue("enumerationValues",
new Object[]{"TOP", 1, "javax.swing.SwingConstants.TOP"});
} catch(IntrospectionException e) { e.printStackTrace(); }
return p;
}
示例7: getPropertyDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
public PropertyDescriptor[] getPropertyDescriptors() {
System.out.println("LanguagesDataLoaderBeanInfo.getPropertyDescriptors");
try {
PropertyDescriptor[] pds = new PropertyDescriptor[] {
new PropertyDescriptor ("NBSFiles", LanguagesDataLoader.class, "getNBSFiles", null),
};
pds [0].setDisplayName ("GLF Files");
pds [0].setBound (true);
pds [0].setPropertyEditorClass (ActionsEditor.class);
return pds;
} catch (IntrospectionException ie) {
ie.printStackTrace();
return new PropertyDescriptor[0];
}
}
示例8: createDialogArea
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
try {
PropertyDescriptor[] availablesParameters = null;
List<RequestableVariable> dboVariables = null;
if (props != null) {
availablesParameters = props;
} else {
availablesParameters = CachedIntrospector.getBeanInfo(couchDbTransaction).getPropertyDescriptors();
}
if (couchDbTransaction != null) {
dboVariables = couchDbTransaction.getVariablesList();
}
couchVariablesComposite = new CouchVariablesComposite(parent, SWT.V_SCROLL, dboVariables);
couchVariablesComposite.setPropertyDescriptor(couchDbTransaction, availablesParameters, couchDbTransaction.getParent());
GridData couchVarData = new GridData(GridData.FILL_BOTH);
couchVarData.horizontalSpan = 2;
couchVariablesComposite.setLayoutData(couchVarData);
if (couchVariablesComposite.getSelectedParameters().size()==0) {
setReturnCode(-1);
}
} catch (IntrospectionException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return couchVariablesComposite;
}
示例9: propertyDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
public static PropertyDescriptor[] propertyDescriptors(Class<?> c) {
BeanInfo beanInfo = null;
try {
beanInfo = Introspector.getBeanInfo(c);
} catch (IntrospectionException e) {
e.printStackTrace();
}
return beanInfo.getPropertyDescriptors();
}
示例10: getPropertyDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
public PropertyDescriptor[] getPropertyDescriptors() {
try {
return new PropertyDescriptor[] {
new PropertyDescriptor("name", Match.class, "name", null) };
} catch (IntrospectionException e ) {
e.printStackTrace();
return null;
}
}
示例11: PojoPropertiesConverter
import java.beans.IntrospectionException; //导入方法依赖的package包/类
public PojoPropertiesConverter(Class<?> argType){
this.argType = argType;
try {
resolveParamProperties();
} catch (IntrospectionException e) {
e.printStackTrace();
}
}
示例12: getPropertyDescriptors
import java.beans.IntrospectionException; //导入方法依赖的package包/类
@Override
public PropertyDescriptor[] getPropertyDescriptors() {
PropertyDescriptor[] p = new PropertyDescriptor[2];
try {
// value
PropertyDescriptor pdValue = new PropertyDescriptor(
"value", TestClass.class, "getValue", "setValue");
pdValue.setBound(true);
pdValue.setConstrained(true);
pdValue.setExpert(true);
pdValue.setHidden(true);
pdValue.setPreferred(true);
pdValue.setValue("required", true);
pdValue.setValue("visualUpdate", true);
pdValue.setShortDescription("user-defined-value");
pdValue.setValue("enumerationValues", new Object[]{
"EAST", 3, "javax.swing.SwingConstants.EAST",
"WEST", 7, "javax.swing.SwingConstants.WEST"});
p[iValue] = pdValue;
// other
PropertyDescriptor pdOther = new PropertyDescriptor(
"other", TestClass.class, "getOther", "setOther");
pdOther.setBound(false);
pdOther.setConstrained(false);
pdOther.setExpert(false);
pdOther.setHidden(false);
pdOther.setPreferred(false);
pdOther.setValue("required", false);
pdOther.setValue("visualUpdate", false);
pdOther.setShortDescription("user-defined-other");
pdOther.setValue("enumerationValues", new Object[]{
"TOP", 1, "javax.swing.SwingConstants.TOP"});
p[iOther] = pdOther;
} catch(IntrospectionException e) {
e.printStackTrace();
}
return p;
}