All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.webpieces.templatingdev.impl.OurGroovyClassLoader Maven / Gradle / Ivy

There is a newer version: 2.1.109
Show newest version
package org.webpieces.templatingdev.impl;

import java.util.HashSet;
import java.util.Set;

import groovy.lang.GroovyClassLoader;

public class OurGroovyClassLoader extends GroovyClassLoader {

	private Set definedClasses = new HashSet<>();
	
	@SuppressWarnings("rawtypes")
	@Override
    public Class defineClass(String name, byte[] b) {
    	definedClasses.add(name);
        return super.defineClass(name, b, 0, b.length);
    }
	
	public boolean isClassDefined(String name) {
		return definedClasses.contains(name);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy