setClassName(getClassName());
}
if(RoleMapping.class.isAssignableFrom(theClass) && result instanceof String){
String endpoint = (String)result;
RoleMapping rm = RoleMapping.create();
rm.setEndpoint(endpoint);
result = rm;
}
boolean isRoleMappingClass = false;
if(result instanceof RoleMapping){
isRoleMappingClass = true;
tempRole = result;
}
if(instance.getProcessTransactionContext().getSharedContext("resultForTransformers")==null){
instance.getProcessTransactionContext().setSharedContext("resultForTransformers", new HashMap());
}
HashMap resultsForTransformers = (HashMap) instance.getProcessTransactionContext().getSharedContext("resultForTransformers");
if(!resultsForTransformers.containsKey(this)){
resultsForTransformers.put(this, result);
if(result instanceof RoleMapping){
RoleMapping rm = (RoleMapping)result;
try {
rm.beforeFirst();
rm.fill(instance);
String endpoint = rm.getEndpoint();
result = rm;
} catch (Exception e) {
e.printStackTrace();
}
}
}
if(getterMethods==null){
setClassName(getClassName());
}
String outputArgumentName = (String)options.get(OPTION_KEY_OUTPUT_ARGUMENT);
Method getter = (Method) getterMethods.get(outputArgumentName);
if(getter!=null){
try {
result = getter.invoke(result, new Object[]{});
if(result == null && isRoleMappingClass){
RoleMapping rm = (RoleMapping)tempRole;
rm.beforeFirst();
rm.fill(instance);
result = getter.invoke(rm, new Object[]{});
}
return result;
} catch (ClassCastException cce) {