View Javadoc
1 package org.jadetower.resolver.impl; 2 3 /* 4 Copyright (c) 2003, J Aaron Farr 5 All rights reserved. 6 7 This software is published under the terms of the JadeTower Software License, 8 a BSD derived license, a copy of which has been included with this 9 distribution in the LICENSE file. <http://www.jadetower.org> 10 */ 11 12 13 import org.jadetower.resolver.ResolverFactory; 14 import org.jadetower.resolver.ResolverUtils; 15 16 /*** 17 * resolves the "class" schema 18 */ 19 public class ClassResolver 20 implements ResolverFactory 21 { 22 23 public static final String SCHEME = "class"; 24 25 public ClassResolver() { 26 } 27 28 public Object resolve(String uri) throws Exception { 29 Object object = null; 30 String scheme = ResolverUtils.getScheme(uri); 31 if(scheme.equalsIgnoreCase(SCHEME)){ 32 String name= ResolverUtils.getPath(uri); 33 object = Class.forName(name); 34 } 35 return object; 36 } 37 }

This page was automatically generated by Maven