org.gmetrics.util.io
Class DefaultResourceFactory

java.lang.Object
  extended by org.gmetrics.util.io.DefaultResourceFactory
All Implemented Interfaces:
groovy.lang.GroovyObject, ResourceFactory

public class DefaultResourceFactory
extends java.lang.Object
implements groovy.lang.GroovyObject, ResourceFactory

Default implementation of ResourceFactory.

This is an internal class and its API is subject to change.

Version:
$Revision: 24 $ - $Date: 2009-12-10 21:17:05 -0500 (Thu, 10 Dec 2009) $
Author:
Chris Mair

Constructor Summary
DefaultResourceFactory()
           
 
Method Summary
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.Object getProperty(java.lang.String name)
           
 Resource getResource(java.lang.String path)
          Return a Resource instance suitable for the specified path.
 java.lang.Object invokeMethod(java.lang.String name, java.lang.Object args)
           
 void setMetaClass(groovy.lang.MetaClass metaClass)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultResourceFactory

public DefaultResourceFactory()
Method Detail

getResource

public Resource getResource(java.lang.String path)
                     throws java.io.IOException
Return a Resource instance suitable for the specified path.

Specified by:
getResource in interface ResourceFactory
Parameters:
path - - the path to the resource. Must not be null or empty. This may be optionally prefixed by "classpath:" or any of the valid java.net.URL prefixes (e.g., "file:", "http:")
Throws:
java.io.IOException - - if an error occurs opening the InputStream

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass metaClass)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public java.lang.Object invokeMethod(java.lang.String name,
                                     java.lang.Object args)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public java.lang.Object getProperty(java.lang.String name)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject


Copyright © 2010. All Rights Reserved.