/** * @param theBoundTypeBinder * If the child is of a type that requires a constructor argument to instantiate, this is the argument to * use * @param theDefinedLocally * See {@link Extension#definedLocally()} */ RuntimeChildDeclaredExtensionDefinition(Field theField, Child theChild, Description theDescriptionAnnotation, Extension theExtension, String theElementName, String theExtensionUrl, Class<? extends IBase> theChildType, Object theBoundTypeBinder) throws ConfigurationException { super(theField, theElementName, theChild, theDescriptionAnnotation); assert isNotBlank(theExtensionUrl); myExtensionUrl = theExtensionUrl; myChildType = theChildType; myDefinedLocally = theExtension.definedLocally(); myModifier = theExtension.isModifier(); myInstanceConstructorArguments = theBoundTypeBinder; List<Class<? extends IBase>> choiceTypes = new ArrayList<Class<? extends IBase>>(); for (Class<? extends IElement> next : theChild.type()) { choiceTypes.add(next); } if (Modifier.isAbstract(theChildType.getModifiers()) == false) { choiceTypes.add(theChildType); } setChoiceTypes(choiceTypes); }
/** * @param theBoundTypeBinder * If the child is of a type that requires a constructor argument to instantiate, this is the argument to * use * @param theDefinedLocally * See {@link Extension#definedLocally()} */ RuntimeChildDeclaredExtensionDefinition(Field theField, Child theChild, Description theDescriptionAnnotation, Extension theExtension, String theElementName, String theExtensionUrl, Class<? extends IBase> theChildType, Object theBoundTypeBinder) throws ConfigurationException { super(theField, theElementName, theChild, theDescriptionAnnotation); assert isNotBlank(theExtensionUrl); myExtensionUrl = theExtensionUrl; myChildType = theChildType; myDefinedLocally = theExtension.definedLocally(); myModifier = theExtension.isModifier(); myInstanceConstructorArguments = theBoundTypeBinder; List<Class<? extends IBase>> choiceTypes = new ArrayList<Class<? extends IBase>>(); for (Class<? extends IElement> next : theChild.type()) { choiceTypes.add(next); } if (Modifier.isAbstract(theChildType.getModifiers()) == false) { choiceTypes.add(theChildType); } setChoiceTypes(choiceTypes); }