001 package org.picocontainer.behaviors; 002 003 import org.picocontainer.ComponentAdapter; 004 import org.picocontainer.ObjectReference; 005 006 /** 007 * static collection of factory methods for easier behavior creation 008 * 009 * @author Konstantin Pribluda 010 */ 011 public class Behavior { 012 013 public static final org.picocontainer.Behavior cached(ComponentAdapter delegate) { 014 return new Cached(delegate); 015 } 016 017 public static final org.picocontainer.Behavior cached(ComponentAdapter delegate, ObjectReference instanceReference) { 018 return new Cached(delegate,instanceReference); 019 } 020 021 022 public static final org.picocontainer.Behavior decorated(ComponentAdapter delegate, Decorated.Decorator decorator) { 023 return new Decorated(delegate,decorator); 024 } 025 }