List of usage examples for java.lang IllegalAccessException printStackTrace
public void printStackTrace()
From source file:com.base2.kagura.core.report.connectors.FakeDataReportConnector.java
/** * {@inheritDoc}/*from ww w . j a v a 2s.c o m*/ */ @Override public void runReport(Map<String, Object> extra) { rows = new ArrayList<Map<String, Object>>(data != null ? data : new ArrayList<Map<String, Object>>()); if (parameterConfig != null) { for (final ParamConfig paramConfig : parameterConfig) { if (paramRules == null) continue; final FakeReportConfig.ParamToColumnRule paramToColumnRule = paramRules.get(paramConfig.getName()); if (paramToColumnRule == null) continue; try { if (StringUtils.isBlank(BeanUtils.getProperty(paramConfig, "value"))) continue; } catch (IllegalAccessException e) { e.printStackTrace(); continue; } catch (InvocationTargetException e) { e.printStackTrace(); continue; } catch (NoSuchMethodException e) { e.printStackTrace(); continue; } switch (paramToColumnRule.getMapRule()) { case Exact: rows = (List<Map<String, Object>>) CollectionUtils.select(rows, new ExactEquals(paramToColumnRule, paramConfig)); break; case SubString: rows = (List<Map<String, Object>>) CollectionUtils.select(rows, new SubstringOrExact(paramToColumnRule, paramConfig)); break; case IntegerRange: rows = (List<Map<String, Object>>) CollectionUtils.select(rows, new IntegerRange(paramToColumnRule, paramConfig)); break; } } } }
From source file:org.kuali.kra.budget.calculator.query.QueryEngine.java
public void addDataCollection(Object object, String... strings) { for (int i = 0; i < strings.length; i++) { try {/*from w w w. j a v a 2s . c o m*/ List dataList = (List) PropertyUtils.getProperty(object, strings[i]); if (dataList != null && !dataList.isEmpty()) { dataCollection.put(dataList.get(0).getClass(), dataList); } } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } } }
From source file:de.Keyle.MyPet.compat.v1_7_R4.PlatformHelper.java
public void addZombieTargetGoal(Zombie zombie) { EntityZombie ez = ((CraftZombie) zombie).getHandle(); if (EntityInsentient_goalSelector_FIELD != null) { try {//from w w w . j ava2 s.c o m PathfinderGoalSelector pgs = (PathfinderGoalSelector) EntityInsentient_goalSelector_FIELD.get(ez); pgs.a(3, new PathfinderGoalMeleeAttack(ez, EntityMyPet.class, 1.0D, true)); } catch (IllegalAccessException e) { e.printStackTrace(); } } }
From source file:de.Keyle.MyPet.compat.v1_7_R4.BukkitHelper.java
public void addZombieTargetGoal(Zombie zombie) { EntityZombie ez = ((CraftZombie) zombie).getHandle(); if (goalSelectorField != null) { try {/* w w w .j ava 2s .co m*/ PathfinderGoalSelector pgs = (PathfinderGoalSelector) goalSelectorField.get(ez); pgs.a(3, new PathfinderGoalMeleeAttack(ez, EntityMyPet.class, 1.0D, true)); } catch (IllegalAccessException e) { e.printStackTrace(); } } }
From source file:us.mn.state.health.lims.reports.action.implementation.IndicatorSectionPerformanceReport.java
public void setRequestParameters(BaseActionForm dynaForm) { try {//from w ww . j a va 2 s.c o m PropertyUtils.setProperty(dynaForm, "reportName", StringUtil.getMessageForKey("reports.label.indicator.performance")); PropertyUtils.setProperty(dynaForm, "noRequestSpecifications", Boolean.TRUE); //PropertyUtils.setProperty(dynaForm, "exportOptions", getExportOptions()); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } }
From source file:de.Keyle.MyPet.compat.v1_9_R1.BukkitHelper.java
public void addZombieTargetGoal(Zombie zombie) { EntityZombie ez = ((CraftZombie) zombie).getHandle(); if (goalSelectorField != null) { try {//from w ww . j a v a 2s . c om PathfinderGoalSelector pgs = (PathfinderGoalSelector) goalSelectorField.get(ez); //pgs.a(3, new PathfinderGoalMeleeAttack(ez, EntityMyPet.class, 1.0D, true)); } catch (IllegalAccessException e) { e.printStackTrace(); } } }
From source file:gov.nih.nci.rembrandt.web.struts2.action.EditCGHAction.java
public String execute() { // Shan: commented out. Why are they needed. // HttpSession session = request.getSession(); // if (form == null) { ///*from w w w. j a v a2 s. co m*/ // form = new ComparativeGenomicForm(); // if ("request".equals(mapping.getScope())) // request.setAttribute(mapping.getAttribute(), form); // else // session.setAttribute(mapping.getAttribute(), form); // } //ComparativeGenomicForm cdForm = (ComparativeGenomicForm) form; form = new ComparativeGenomicForm(); form.reset(servletRequest); String sessionId = this.servletRequest.getSession().getId(); SessionQueryBag queryBag = presentationTierCache.getSessionQueryBag(sessionId); String queryKey = (String) this.servletRequest.getAttribute("queryKey"); if (queryBag != null) { // get the Form from the sessionQB ComparativeGenomicForm origCdForm = (ComparativeGenomicForm) queryBag.getFormBeanMap().get(queryKey); try { // try this, else call each setter PropertyUtils.copyProperties(form, origCdForm); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvocationTargetException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchMethodException e) { // TODO Auto-generated catch block e.printStackTrace(); } } String editForward = ""; if (this.copy.equalsIgnoreCase("true")) form.setQueryName(form.getQueryName() + "_copy"); editForward = "goEditCGH"; // Show RegionView DIV if (form.getGeneList() == null || form.getGeneList().length() == 0) { this.servletRequest.setAttribute("selectedView", "regionView"); } return editForward; }
From source file:com.liveneo.plat.web.action.JobmsgAction.java
public String editJobmsg() { try {//from w w w . j ava 2 s .c o m jobmsgForm = new JobmsgForm(); BdJobmsg bdJobmsg = new BdJobmsg(); if (StringUtils.isNotEmpty(jobmsgKey)) { } else { if (StringUtils.isNotEmpty((String) this.getSession().getAttribute("jobmsgKey"))) jobmsgKey = (String) this.getSession().getAttribute("jobmsgKey"); else return AbstractActionSupport.EDIT; } // list bdJobmsg = this.jobmsgService.getBdJobmsg(IntegerUtil.converStrToInteger(jobmsgKey)); WebappUtil.copyProperties(jobmsgForm, bdJobmsg); this.getSession().setAttribute("jobmsgForm", jobmsgForm); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } finally { } return AbstractActionSupport.EDIT; }
From source file:org.dbpedia.spotlight.evaluation.external.OpenCalaisClient.java
private List<DBpediaResource> parseJson(Text rawText, String annotatedText) throws AnnotationException { List<DBpediaResource> entities = new ArrayList<DBpediaResource>(); JSONObject jsonObj = JSONObject.fromObject(annotatedText); //System.out.println(); Set entries = jsonObj.entrySet(); for (Object o : entries) { Map.Entry m = (Map.Entry) o; String key = (String) m.getKey(); if (key.equals("doc")) continue; Object bean = net.sf.json.JSONObject.toBean((JSONObject) m.getValue()); try {//from w ww .ja v a 2 s .c o m //System.out.println(bean); Object entryType = PropertyUtils.getProperty(bean, "_typeGroup"); if (entryType.equals("entities")) { String uri = key; Object entryName = PropertyUtils.getProperty(bean, "name"); String type = (String) PropertyUtils.getProperty(bean, "_type"); Double relevance = (Double) PropertyUtils.getProperty(bean, "relevance"); List instances = (List) PropertyUtils.getProperty(bean, "instances"); for (Object i : instances) { Integer offset = (Integer) PropertyUtils.getProperty(i, "offset"); String dbpediaUri = dereference(uri); DBpediaResource resource = new DBpediaResource(dbpediaUri); //System.out.println(response); entities.add(resource); //TODO For annotations we can get occurrences instead of just DBpediaResources // List<DBpediaType> types = new ArrayList<DBpediaType>(); // types.add(new DBpediaType(type)); // resource.setTypes(types); // DBpediaResourceOccurrence occ = new DBpediaResourceOccurrence(uri, resource, new SurfaceForm("name"), rawText, offset, Provenance.Annotation(), relevance, 1.0); // System.out.printf("key: %s, name: %s, offset: %s\n", key, entryName, offset); } } } catch (IllegalAccessException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (InvocationTargetException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } catch (NoSuchMethodException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. System.out.println(o); } } //System.out.println(json); return entities; }
From source file:com.epam.jdi.uitests.mobile.appium.elements.complex.table.EntityTable.java
private void setEntityField(E entity, Field[] fields, String fieldName, String value) { Optional<Field> opt = Arrays.stream(fields).filter(f -> f.getName().equalsIgnoreCase(fieldName)) .findFirst();/*from ww w . j av a2 s . c o m*/ if (!opt.isPresent()) { return; } Field field = opt.get(); try { FieldUtils.writeField(field, entity, ReflectionUtils.convertStringToType(value, field), true); } catch (IllegalAccessException e) { e.printStackTrace(); } }