Java Doc for Key.java in  » Testing » Ejb3Unit » com » bm » ejb3guice » inject » 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 » Testing » Ejb3Unit » com.bm.ejb3guice.inject 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.bm.ejb3guice.inject.Key

Key
abstract public class Key (Code)
Binding key consisting of an injection type and an optional annotation. Matches the type and annotation at a point of injection.

For example, Key.get(Service.class, Transactional.class) will match:

 Inject
 public void setService(
 Transactional Service service) {
 ...
 }
 

Key supports generic types via subclassing just like TypeLiteral .
author:
   crazybob@google.com (Bob Lee)


Inner Class :interface AnnotationStrategy
Inner Class :static class AnnotationInstanceStrategy implements AnnotationStrategy
Inner Class :static class AnnotationTypeStrategy implements AnnotationStrategy

Field Summary
final static  AnnotationStrategyNULL_STRATEGY
    
final  AnnotationStrategyannotationStrategy
    
final  inthashCode
    
final  TypeLiteral<T>typeLiteral
    

Constructor Summary
protected  Key(Class<? extends Annotation> annotationType)
    
protected  Key(Annotation annotation)
    
protected  Key()
    

Method Summary
public  booleanequals(Object o)
    
static  Key<T>get(Class<T> type, AnnotationStrategy annotationStrategy)
     Gets a key for an injection type and an annotation strategy.
public static  Key<T>get(Class<T> type)
     Gets a key for an injection type.
public static  Key<T>get(Class<T> type, Class<? extends Annotation> annotationType)
     Gets a key for an injection type and an annotation type.
public static  Key<T>get(Class<T> type, Annotation annotation)
     Gets a key for an injection type and an annotation.
public static  Keyget(Type type)
     Gets a key for an injection type.
public static  Keyget(Type type, Class<? extends Annotation> annotationType)
     Gets a key for an injection type and an annotation type.
public static  Keyget(Type type, Annotation annotation)
     Gets a key for an injection type and an annotation.
public static  Key<T>get(TypeLiteral<T> typeLiteral)
     Gets a key for an injection type.
public static  Key<T>get(TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType)
     Gets a key for an injection type and an annotation type.
public static  Key<T>get(TypeLiteral<T> typeLiteral, Annotation annotation)
     Gets a key for an injection type and an annotation.
static  Keyget(Type type, Member member, Annotation[] annotations, ErrorHandler errorHandler)
     Gets a key for the given type, member and annotations.
public  AnnotationgetAnnotation()
     Gets the annotation.
 StringgetAnnotationName()
    
public  Class<? extends Annotation>getAnnotationType()
     Gets the annotation type.
 Class<? super T>getRawType()
    
public  TypeLiteral<T>getTypeLiteral()
     Gets the key type.
 booleanhasAnnotationType()
    
 booleanhasAttributes()
     Returns true if this key has annotation attributes.
public  inthashCode()
    
static  booleanisBindingAnnotation(Annotation annotation)
    
static  booleanisBindingAnnotation(Class<? extends Annotation> annotationType)
    
static  booleanisMarker(Class<? extends Annotation> annotationType)
     Returns true if the given annotation type has no attributes.
 Key<T>ofType(Class<T> type)
     Returns a new key of the specified type with the same annotation as this key.
 KeyofType(Type type)
     Returns a new key of the specified type with the same annotation as this key.
static  AnnotationStrategystrategyFor(Annotation annotation)
     Gets the strategy for an annotation.
static  AnnotationStrategystrategyFor(Class<? extends Annotation> annotationType)
     Gets the strategy for an annotation type.
public  StringtoString()
    
 Key<T>withoutAttributes()
     Returns this key without annotation attributes, i.e.

Field Detail
NULL_STRATEGY
final static AnnotationStrategy NULL_STRATEGY(Code)



annotationStrategy
final AnnotationStrategy annotationStrategy(Code)



hashCode
final int hashCode(Code)



typeLiteral
final TypeLiteral<T> typeLiteral(Code)




Constructor Detail
Key
protected Key(Class<? extends Annotation> annotationType)(Code)



Key
protected Key(Annotation annotation)(Code)



Key
protected Key()(Code)




Method Detail
equals
public boolean equals(Object o)(Code)



get
static Key<T> get(Class<T> type, AnnotationStrategy annotationStrategy)(Code)
Gets a key for an injection type and an annotation strategy.



get
public static Key<T> get(Class<T> type)(Code)
Gets a key for an injection type.



get
public static Key<T> get(Class<T> type, Class<? extends Annotation> annotationType)(Code)
Gets a key for an injection type and an annotation type.



get
public static Key<T> get(Class<T> type, Annotation annotation)(Code)
Gets a key for an injection type and an annotation.



get
public static Key get(Type type)(Code)
Gets a key for an injection type.



get
public static Key get(Type type, Class<? extends Annotation> annotationType)(Code)
Gets a key for an injection type and an annotation type.



get
public static Key get(Type type, Annotation annotation)(Code)
Gets a key for an injection type and an annotation.



get
public static Key<T> get(TypeLiteral<T> typeLiteral)(Code)
Gets a key for an injection type.



get
public static Key<T> get(TypeLiteral<T> typeLiteral, Class<? extends Annotation> annotationType)(Code)
Gets a key for an injection type and an annotation type.



get
public static Key<T> get(TypeLiteral<T> typeLiteral, Annotation annotation)(Code)
Gets a key for an injection type and an annotation.



get
static Key get(Type type, Member member, Annotation[] annotations, ErrorHandler errorHandler)(Code)
Gets a key for the given type, member and annotations.



getAnnotation
public Annotation getAnnotation()(Code)
Gets the annotation.



getAnnotationName
String getAnnotationName()(Code)



getAnnotationType
public Class<? extends Annotation> getAnnotationType()(Code)
Gets the annotation type.



getRawType
Class<? super T> getRawType()(Code)



getTypeLiteral
public TypeLiteral<T> getTypeLiteral()(Code)
Gets the key type.



hasAnnotationType
boolean hasAnnotationType()(Code)



hasAttributes
boolean hasAttributes()(Code)
Returns true if this key has annotation attributes.



hashCode
public int hashCode()(Code)



isBindingAnnotation
static boolean isBindingAnnotation(Annotation annotation)(Code)



isBindingAnnotation
static boolean isBindingAnnotation(Class<? extends Annotation> annotationType)(Code)



isMarker
static boolean isMarker(Class<? extends Annotation> annotationType)(Code)
Returns true if the given annotation type has no attributes.



ofType
Key<T> ofType(Class<T> type)(Code)
Returns a new key of the specified type with the same annotation as this key.



ofType
Key ofType(Type type)(Code)
Returns a new key of the specified type with the same annotation as this key.



strategyFor
static AnnotationStrategy strategyFor(Annotation annotation)(Code)
Gets the strategy for an annotation.



strategyFor
static AnnotationStrategy strategyFor(Class<? extends Annotation> annotationType)(Code)
Gets the strategy for an annotation type.



toString
public String toString()(Code)



withoutAttributes
Key<T> withoutAttributes()(Code)
Returns this key without annotation attributes, i.e. with only the annotation type.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.