code: @Override
  	public boolean isActive() {
  		try {
  			return hasMethodThat(named("getCurrentTemplate")
  					.and(ElementMatchers.<MethodDescription.InDefinedShape>isPublic())
  					.and(takesArguments(0)))
  					.matches(new TypeDescription.ForLoadedType(Class.forName("freemarker.core.Environment")));
  		} catch (ClassNotFoundException e) {
  			return false;
  		}
  	}
docs: Makes sure that this transformer is only applied on Freemarker versions {@code >= 2.3.23} where the
  {@link Environment#getCurrentTemplate()} method was made public. This prevents nasty
  {@link IllegalAccessError}s and {@link NoSuchMethodError}s.