Skip to content

Commit

Permalink
Extension point for PropertyResolvers.
Browse files Browse the repository at this point in the history
  • Loading branch information
FrantaM committed Nov 16, 2015
1 parent 36230d4 commit d4cd3ba
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
Expand All @@ -16,6 +16,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.ServiceLoader;
import java.util.Set;

import net.ftlines.metagen.processor.Constants;
Expand All @@ -33,6 +34,11 @@ public PropertyResolvers()
resolvers.add(new BeanResolver());
resolvers.add(new JpaEntityResolver());
resolvers.add(new AnnotatedResolver());

final ClassLoader cl = this.getClass().getClassLoader();
for (final PropertyResolver pr : ServiceLoader.load(PropertyResolver.class, cl)) {
resolvers.add(pr);
}
}

@Override
Expand Down

0 comments on commit d4cd3ba

Please sign in to comment.