11/*
2- * Copyright 2011 SpringSource
2+ * Copyright 2011-2025 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
66 * You may obtain a copy of the License at
77 *
8- * http ://www.apache.org/licenses/LICENSE-2.0
8+ * https ://www.apache.org/licenses/LICENSE-2.0
99 *
1010 * Unless required by applicable law or agreed to in writing, software
1111 * distributed under the License is distributed on an "AS IS" BASIS,
1515 */
1616package org .grails .compiler .gorm ;
1717
18- import java .net .URL ;
1918import java .util .Collection ;
2019
2120import groovy .transform .Canonical ;
2928import org .grails .compiler .injection .GrailsASTUtils ;
3029import org .grails .core .artefact .DomainClassArtefactHandler ;
3130import org .grails .datastore .mapping .reflect .AstUtils ;
32- import org .grails .io .support .GrailsResourceUtils ;
3331
3432/**
3533 * Transforms GORM entities making the GORM API available to Java.
3634 *
3735 * @author Graeme Rocher
36+ * @author Michael Yan
3837 * @since 2.0
3938 */
4039@ AstTransformer
@@ -45,15 +44,10 @@ public String[] getArtefactTypes() {
4544 return new String [] { DomainClassArtefactHandler .TYPE };
4645 }
4746
48- public boolean shouldInject (URL url ) {
49- return GrailsResourceUtils .isDomainClass (url );
50- }
51-
5247 public static Collection <String > getKnownEntityNames () {
5348 return AstUtils .getKnownEntityNames ();
5449 }
5550
56-
5751 @ Override
5852 public void performInjection (SourceUnit source , GeneratorContext context , ClassNode classNode ) {
5953 if (GrailsASTUtils .hasAnnotation (classNode , Canonical .class )) {
0 commit comments