public static void initBeansHandler(TypeBinding typeBinding) { typeBinding.setHandler(SpringBeansHandler.HANDLER); // handle import typeBinding.pushInterceptor(SpringSchemaBinding.importQName, ImportInterceptor.INTERCEPTOR); // handle aliases typeBinding.pushInterceptor(SpringSchemaBinding.aliasQName, DeploymentAliasInterceptor.INTERCEPTOR); // handle beans typeBinding.pushInterceptor(SpringSchemaBinding.beanQName, DeploymentBeanInterceptor.INTERCEPTOR); // Deployment can take wildcards typeBinding.getWildcard().setWildcardHandler(DeploymentWildcardHandler.HANDLER); }
public static void configureValueBindings(TypeBinding typeBinding) { // type has beans typeBinding.pushInterceptor(SpringSchemaBinding.beanQName, ValueMetaDataElementInterceptor.VALUES); // type has refs typeBinding.pushInterceptor(SpringSchemaBinding.refQName, ValueMetaDataElementInterceptor.VALUES); // type has values typeBinding.pushInterceptor(SpringSchemaBinding.valueQName, ValueMetaDataElementInterceptor.VALUES); // type can take a list typeBinding.pushInterceptor(SpringSchemaBinding.listQName, ValueMetaDataElementInterceptor.VALUES); // type can take a set typeBinding.pushInterceptor(SpringSchemaBinding.setQName, ValueMetaDataElementInterceptor.VALUES); // type can take a map typeBinding.pushInterceptor(SpringSchemaBinding.mapQName, ValueMetaDataElementInterceptor.VALUES); // type has a null typeBinding.pushInterceptor(SpringSchemaBinding.nullQName, NullValueElementInterceptor.NULLVALUES); // type has wildcard WildcardBinding wcb = typeBinding.getWildcard(); if (wcb == null) throw new IllegalStateException("Missing wildcard binding for type: " + typeBinding.getQName()); wcb.setWildcardHandler(ValueWildcardHandler.WILDCARD); }