Add an adaptor for a kind of object so ST knows how to pull properties from them. Add adaptors in increasing order of specificity. ST adds Object, Map, ST, and Aggregate model adaptors for you first. Adaptors you add have priority over default adaptors. If an adap
(Class<?> attributeType, ModelAdaptor adaptor)
| 700 | */ |
| 701 | |
| 702 | public void registerModelAdaptor(Class<?> attributeType, ModelAdaptor adaptor) { |
| 703 | if ( attributeType.isPrimitive() ) { |
| 704 | throw new IllegalArgumentException("can't register ModelAdaptor for primitive type "+attributeType.getSimpleName()); |
| 705 | } |
| 706 | adaptors.put(attributeType, adaptor); |
| 707 | } |
| 708 | |
| 709 | public ModelAdaptor getModelAdaptor(Class<?> attributeType) { |
| 710 | return adaptors.get(attributeType); |
nothing calls this directly
no test coverage detected