org.jvnet.hk2.component.classmodel
Class FileCachingClassPathAdvisor

java.lang.Object
  extended by org.jvnet.hk2.component.classmodel.FileCachingClassPathAdvisor
All Implemented Interfaces:
FileFilter, ClassPathAdvisor

public class FileCachingClassPathAdvisor
extends Object
implements ClassPathAdvisor

Uses a properties file to map all known URIs to last modified date,size, and whether it contains significant class-model artifacts that contributes to habitat production.

Author:
Jeff Trent

Field Summary
static String HK2_CLASS_PATH_ADVISOR_CACHE_FILE
           
static String TAG_SYS_PROP
           
 
Constructor Summary
FileCachingClassPathAdvisor()
           
FileCachingClassPathAdvisor(String cacheFileName)
           
 
Method Summary
 boolean accept(File file)
           
 void finishing(Set<URI> significant, Set<URI> insignificant)
          Called at the completion of class-model habitat creation
 void starting(ClassPath inhabitantsClassPath)
          Called at the start of class-model habitat creation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_SYS_PROP

public static final String TAG_SYS_PROP
See Also:
Constant Field Values

HK2_CLASS_PATH_ADVISOR_CACHE_FILE

public static final String HK2_CLASS_PATH_ADVISOR_CACHE_FILE
See Also:
Constant Field Values
Constructor Detail

FileCachingClassPathAdvisor

public FileCachingClassPathAdvisor()

FileCachingClassPathAdvisor

public FileCachingClassPathAdvisor(String cacheFileName)
Method Detail

starting

public void starting(ClassPath inhabitantsClassPath)
Description copied from interface: ClassPathAdvisor
Called at the start of class-model habitat creation

Specified by:
starting in interface ClassPathAdvisor
Parameters:
inhabitantsClassPath - the full classpath for locating class artifacts

finishing

public void finishing(Set<URI> significant,
                      Set<URI> insignificant)
Description copied from interface: ClassPathAdvisor
Called at the completion of class-model habitat creation

Specified by:
finishing in interface ClassPathAdvisor
Parameters:
significant - the set of code sources that were significant in that they contributed to logical habitat creation
insignificant - the set of code sources that were not significant in creation of the logical habitat

accept

public boolean accept(File file)
Specified by:
accept in interface FileFilter


Copyright © 2011 Oracle Corporation. All Rights Reserved.