public J2EEConstants() { try { ReadXMLFile readXml = new ReadXMLFile(); readXml.loadJavaWebServiceConstants(); Field[] arrayOfField = this.getClass().getDeclaredFields(); for (Field field : arrayOfField) { field.setAccessible(true); Object localObject = field.get(this); if (localObject instanceof String) { field.set(this, readXml.getValue((String) localObject)); } } } catch (Exception localException) { log.info("Exception in JavaWebserviceConstants::" + localException.getMessage()); } }
public PhrescoJavaWebserviceUiConstants() { try { readXml = new ReadXMLFile(); readXml.NodejsData(); Field[] arrayOfField1 = super.getClass().getFields(); Field[] arrayOfField2 = arrayOfField1; int i = arrayOfField2.length; for (int j = 0; j < i; ++j) { Field localField = arrayOfField2[j]; Object localObject = localField.get(this); if (localObject instanceof String) localField.set(this, readXml.getValue((String) localObject)); } } catch (Exception localException) { throw new RuntimeException( "Loading " + super.getClass().getSimpleName() + " failed", localException); } }