/** * Creates the array type to use. This will use the provided * XML element to determine the array type and provide a means * for creating an array with the <code>Value</code> object. If * the array types are not compatible an exception is thrown. * * @param value this is the type object with the array details * @param entry this is the entry type for the array instance * * @return this object array type used for the instantiation */ private Instance getInstance(Value value, Class entry) throws Exception { Class expect = getComponentType(); if(!expect.isAssignableFrom(entry)) { throw new InstantiationException("Array of type %s cannot hold %s for %s", expect, entry, type); } return new ArrayInstance(value); }
/** * Creates the array type to use. This will use the provided * XML element to determine the array type and provide a means * for creating an array with the <code>Value</code> object. If * the array types are not compatible an exception is thrown. * * @param value this is the type object with the array details * @param entry this is the entry type for the array instance * * @return this object array type used for the instantiation */ private Instance getInstance(Value value, Class entry) throws Exception { Class expect = getComponentType(); if(!expect.isAssignableFrom(entry)) { throw new InstantiationException("Array of type %s cannot hold %s for %s", expect, entry, type); } return new ArrayInstance(value); }
/** * Creates the array type to use. This will use the provided * XML element to determine the array type and provide a means * for creating an array with the <code>Value</code> object. If * the array types are not compatible an exception is thrown. * * @param value this is the type object with the array details * @param entry this is the entry type for the array instance * * @return this object array type used for the instantiation */ private Instance getInstance(Value value, Class entry) throws Exception { Class expect = getComponentType(); if(!expect.isAssignableFrom(entry)) { throw new InstantiationException("Array of type %s cannot hold %s for %s", expect, entry, type); } return new ArrayInstance(value); }