public Object[] getChoices(final NakedObject owningAdapter) { final Object options = NakedObjectInvokeUtils.invoke(method, owningAdapter); if (options == null) { return null; } if (options.getClass().isArray()) { return ArrayUtils.getObjectAsObjectArray(options); } final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesClass); return NakedObjectAdapterUtils.getCollectionAsObjectArray(options, specification, getRuntimeContext()); }
public Object[] getChoices(final NakedObject owningAdapter) { final Object options = NakedObjectInvokeUtils.invoke(method, owningAdapter); if (options == null) { return null; } if (options.getClass().isArray()) { return ArrayUtils.getObjectAsObjectArray(options); } final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesClass); return NakedObjectAdapterUtils.getCollectionAsObjectArray(options, specification, getRuntimeContext()); }
public Object[][] getChoices(final NakedObject owningAdapter) { final Object[] options = (Object[]) NakedObjectInvokeUtils.invoke(method, owningAdapter); final Object[][] results = new Object[options.length][]; for (int i = 0; i < results.length; i++) { if (options[i] == null) { results[i] = null; } else if (options[i].getClass().isArray()) { results[i] = ArrayUtils.getObjectAsObjectArray(options[i]); } else { final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesType); results[i] = NakedObjectAdapterUtils.getCollectionAsObjectArray(options[i], specification, getRuntimeContext()); } } return results; }
public Object[] getChoices(final NakedObject owningAdapter) { final Object options = NakedObjectInvokeUtils.invoke(method, owningAdapter); if (options == null) { return new Object[0]; } if (options.getClass().isArray()) { return ArrayUtils.getObjectAsObjectArray(options); } else { final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesType); return NakedObjectAdapterUtils.getCollectionAsObjectArray(options, specification, getRuntimeContext()); } }
public Object[] getChoices(final NakedObject owningAdapter) { final Object options = NakedObjectInvokeUtils.invoke(method, owningAdapter); if (options == null) { return new Object[0]; } if (options.getClass().isArray()) { return ArrayUtils.getObjectAsObjectArray(options); } else { final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesType); return NakedObjectAdapterUtils.getCollectionAsObjectArray(options, specification, getRuntimeContext()); } }
public Object[][] getChoices(final NakedObject owningAdapter) { final Object[] options = (Object[]) NakedObjectInvokeUtils.invoke(method, owningAdapter); final Object[][] results = new Object[options.length][]; for (int i = 0; i < results.length; i++) { if (options[i] == null) { results[i] = null; } else if (options.getClass().isArray()) { results[i] = ArrayUtils.getObjectAsObjectArray(options[i]); } else { final NakedObjectSpecification specification = getSpecificationLoader().loadSpecification(choicesType); results[i] = NakedObjectAdapterUtils.getCollectionAsObjectArray(options[i], specification, getRuntimeContext()); } } return results; }