Source Code Cross Referenced for ComponentAdapter.java in  » Inversion-of-Control » PicoContainer » org » picocontainer » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Inversion of Control » PicoContainer » org.picocontainer 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


01:        /*****************************************************************************
02:         * Copyright (C) PicoContainer Organization. All rights reserved.            *
03:         * ------------------------------------------------------------------------- *
04:         * The software in this package is published under the terms of the BSD      *
05:         * style license a copy of which has been included with this distribution in *
06:         * the LICENSE.txt file.                                                     *
07:         *****************************************************************************/package org.picocontainer;
08:
09:        /**
10:         * A component adapter is responsible for providing a specific component
11:         * instance of type <T>. An instance of an implementation of this interface is
12:         * used inside a {@link PicoContainer} for every registered component or
13:         * instance. Each <code>ComponentAdapter</code> instance has to have a key
14:         * which is unique within that container. The key itself is either a class type
15:         * (normally an interface) or an identifier.
16:         *
17:         * @author Jon Tirs&eacute;n
18:         * @author Paul Hammant
19:         * @author Aslak Helles&oslash;y
20:         */
21:        public interface ComponentAdapter<T> {
22:
23:            /**
24:             * Retrieve the key associated with the component.
25:             *
26:             * @return the component's key. Should either be a class type (normally an interface) or an identifier that is
27:             *         unique (within the scope of the current PicoContainer).
28:             */
29:            Object getComponentKey();
30:
31:            /**
32:             * Retrieve the class of the component.
33:             *
34:             * @return the component's implementation class. Should normally be a concrete class (ie, a class that can be
35:             *         instantiated).
36:             */
37:            Class<T> getComponentImplementation();
38:
39:            /**
40:             * Retrieve the component instance. This method will usually create a new instance each time it is called, but that
41:             * is not required. For example, {@link org.picocontainer.behaviors.Cached} will always return the
42:             * same instance.
43:             *
44:             * @param container the {@link PicoContainer}, that is used to resolve any possible dependencies of the instance.
45:             * @return the component instance.
46:             * @throws PicoCompositionException  if the component has dependencies which could not be resolved, or
47:             *                                     instantiation of the component lead to an ambigous situation within the
48:             *                                     container.
49:             */
50:            T getComponentInstance(PicoContainer container)
51:                    throws PicoCompositionException;
52:
53:            /**
54:             * Verify that all dependencies for this adapter can be satisifed. Normally, the adapter should verify this by
55:             * checking that the associated PicoContainer contains all the needed dependnecies.
56:             *
57:             * @param container the {@link PicoContainer}, that is used to resolve any possible dependencies of the instance.
58:             * @throws PicoCompositionException if one or more dependencies cannot be resolved.
59:             */
60:            void verify(PicoContainer container)
61:                    throws PicoCompositionException;
62:
63:            /**
64:             * Accepts a visitor for this ComponentAdapter. The method is normally called by visiting a {@link PicoContainer}, that
65:             * cascades the visitor also down to all its ComponentAdapter instances.
66:             *
67:             * @param visitor the visitor.
68:             */
69:            void accept(PicoVisitor visitor);
70:
71:            ComponentAdapter<T> getDelegate();
72:
73:            <U extends ComponentAdapter> U findAdapterOfType(
74:                    Class<U> componentAdapterType);
75:
76:            String getDescriptor();
77:
78:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.