Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.gen
Class ClassGeneratorResourceLoader

    java.lang.Object
      org.apache.velocity.runtime.resource.loader.ResourceLoader
          org.apache.velocity.runtime.resource.loader.FileResourceLoader
              org.apache.cayenne.gen.ClassGeneratorResourceLoader

    public class ClassGeneratorResourceLoader

extends org.apache.velocity.runtime.resource.loader.FileResourceLoader

Velocity template resource loader customized for Cayenne use. Supports loading templates from the thread ClassLoader and from relative and absolute paths.

Since:
  1.2
Author:
  Andrus Adamchik

Field Summary

Fields inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
`className, isCachingOn, modificationCheckInterval, rsvc`

Constructor Summary
`ClassGeneratorResourceLoader()`

Method Summary
`InputStream` | `getResourceStream(String name)` Returns resource as InputStream.
`protected InputStream` | `loadFromAbsPath(String name)`
`protected InputStream` | `loadFromRelativePath(String name)`
`protected InputStream` | `loadFromThisClassLoader(String name)`
`protected InputStream` | `loadFromThreadClassLoader(String name)`

Methods inherited from class org.apache.velocity.runtime.resource.loader.FileResourceLoader
`getLastModified, init, isSourceModified`

Methods inherited from class org.apache.velocity.runtime.resource.loader.ResourceLoader
`commonInit, getClassName, getModificationCheckInterval, isCachingOn, setCachingOn, setModificationCheckInterval`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ClassGeneratorResourceLoader

    public ClassGeneratorResourceLoader()

Method Detail

### getResourceStream

    public InputStream getResourceStream(String name)
                                  throws org.apache.velocity.exception.ResourceNotFoundException

  Returns resource as InputStream. First calls super implementation. If resource wasn't found, it attempts to load it from current directory or as an absolute path.

  Overrides:
    `getResourceStream` in class `org.apache.velocity.runtime.resource.loader.FileResourceLoader`
  Throws:
    `org.apache.velocity.exception.ResourceNotFoundException`

### loadFromRelativePath

    protected InputStream loadFromRelativePath(String name)

### loadFromAbsPath

    protected InputStream loadFromAbsPath(String name)

### loadFromThreadClassLoader

    protected InputStream loadFromThreadClassLoader(String name)

### loadFromThisClassLoader

    protected InputStream loadFromThisClassLoader(String name)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.