Search in sources :

Example 1 with GrailsCodecClass

use of org.grails.commons.GrailsCodecClass in project grails-core by grails.

the class MockGrailsApplication method getEncoder.

private Encoder getEncoder(GrailsApplication grailsApplication, Class<?> codecClass) {
    Encoder encoder = null;
    if (grailsApplication != null && codecClass != null) {
        GrailsCodecClass codecArtefact = (GrailsCodecClass) grailsApplication.getArtefact("Codec", codecClass.getName());
        encoder = codecArtefact.getEncoder();
    }
    return encoder;
}
Also used : Encoder(org.grails.encoder.Encoder) GrailsCodecClass(org.grails.commons.GrailsCodecClass) DefaultGrailsCodecClass(org.grails.commons.DefaultGrailsCodecClass)

Aggregations

DefaultGrailsCodecClass (org.grails.commons.DefaultGrailsCodecClass)1 GrailsCodecClass (org.grails.commons.GrailsCodecClass)1 Encoder (org.grails.encoder.Encoder)1