1
+ /**
2
+ * Provides classes and predicates for working with the `play` package.
3
+ */
4
+
1
5
import java
2
6
3
7
/**
4
- * Play MVC Framework Result Class
8
+ * A `play.mvc. Result` class.
5
9
*/
6
- class PlayMVCResultClass extends Class {
7
- PlayMVCResultClass ( ) { this .hasQualifiedName ( "play.mvc" , "Result" ) }
10
+ class PlayMvcResultClass extends Class {
11
+ PlayMvcResultClass ( ) { this .hasQualifiedName ( "play.mvc" , "Result" ) }
8
12
}
9
13
10
14
/**
11
- * Play MVC Framework Results Class
12
- *
13
- * Documentation: https://www.playframework.com/documentation/2.8.x/JavaActions
15
+ * A `play.mvc.Results` class.
14
16
*/
15
- class PlayMVCResultsClass extends Class {
16
- PlayMVCResultsClass ( ) { this .hasQualifiedName ( "play.mvc" , "Results" ) }
17
+ class PlayMvcResultsClass extends Class {
18
+ PlayMvcResultsClass ( ) { this .hasQualifiedName ( "play.mvc" , "Results" ) }
17
19
}
18
20
19
21
/**
20
- * Play MVC Framework HTTP Request Header Class
22
+ * A `play.mvc.Http$RequestHeader` class.
21
23
*/
22
- class PlayMVCHTTPRequestHeader extends RefType {
23
- PlayMVCHTTPRequestHeader ( ) { this .hasQualifiedName ( "play.mvc" , "Http$RequestHeader" ) }
24
+ class PlayMvcHttpRequestHeader extends RefType {
25
+ PlayMvcHttpRequestHeader ( ) { this .hasQualifiedName ( "play.mvc" , "Http$RequestHeader" ) }
24
26
}
25
27
26
28
/**
27
- * Play Framework Explicit Body Parser Annotation
28
- *
29
- * Documentation: https://www.playframework.com/documentation/2.8.x/JavaBodyParsers#Choosing-an-explicit-body-parser
29
+ * A `play.mvc.BodyParser<>$Of"` annotation.
30
30
*/
31
31
class PlayBodyParserAnnotation extends Annotation {
32
32
PlayBodyParserAnnotation ( ) { this .getType ( ) .hasQualifiedName ( "play.mvc" , "BodyParser<>$Of" ) }
33
33
}
34
34
35
35
/**
36
- * Play Framework AddCSRFToken Annotation
37
- *
38
- * Documentation: https://www.playframework.com/documentation/2.8.x/JavaCsrf
36
+ * A `play.filters.csrf.AddCSRFToken` annotation.
39
37
*/
40
- class PlayAddCSRFTokenAnnotation extends Annotation {
41
- PlayAddCSRFTokenAnnotation ( ) {
38
+ class PlayAddCsrfTokenAnnotation extends Annotation {
39
+ PlayAddCsrfTokenAnnotation ( ) {
42
40
this .getType ( ) .hasQualifiedName ( "play.filters.csrf" , "AddCSRFToken" )
43
41
}
44
42
}
45
43
46
44
/**
47
- * Play Framework Async Promise - Gets the Promise<Result> Generic Member/Type of (play.libs.F)
48
- *
49
- * Documentation: https://www.playframework.com/documentation/2.5.1/api/java/play/libs/F.Promise.html
45
+ * A member with qualified name `F.Promise<Result>` of package `play.libs.F`.
50
46
*/
51
47
class PlayAsyncResultPromise extends Member {
52
48
PlayAsyncResultPromise ( ) {
@@ -59,9 +55,7 @@ class PlayAsyncResultPromise extends Member {
59
55
}
60
56
61
57
/**
62
- * Play Framework Async Generic Result - Gets the CompletionStage<Result> Generic Type of (java.util.concurrent)
63
- *
64
- * Documentation: https://www.playframework.com/documentation/2.6.x/JavaAsync
58
+ * A type with qualified name `CompletionStage<Result>` of package `java.util.concurrent`.
65
59
*/
66
60
class PlayAsyncResultCompletionStage extends Type {
67
61
PlayAsyncResultCompletionStage ( ) {
@@ -71,7 +65,7 @@ class PlayAsyncResultCompletionStage extends Type {
71
65
}
72
66
73
67
/**
74
- * Play Framework Controllers which extends PlayMVCController recursively - Used to find all Controllers
68
+ * A class which extends PlayMvcController recursively to find all controllers.
75
69
*/
76
70
class PlayController extends Class {
77
71
PlayController ( ) {
@@ -80,9 +74,9 @@ class PlayController extends Class {
80
74
}
81
75
82
76
/**
83
- * Play Framework Controller Action Methods - Mappings to route files
77
+ * A method to find PlayFramework controller action methods, these are mapping's to route files.
84
78
*
85
- * Sample Route - `POST /login @com.company.Application.login()`
79
+ * Sample Route - `POST /login @com.company.Application.login()`.
86
80
*
87
81
* Example - class get's `index` & `login` as valid action methods.
88
82
* ```
@@ -96,24 +90,22 @@ class PlayController extends Class {
96
90
* }
97
91
* }
98
92
* ```
99
- *
100
- * Documentation: https://www.playframework.com/documentation/2.8.x/JavaActions
101
93
*/
102
94
class PlayControllerActionMethod extends Method {
103
95
PlayControllerActionMethod ( ) {
104
96
this = any ( PlayController c ) .getAMethod ( ) and
105
97
(
106
98
this .getReturnType ( ) instanceof PlayAsyncResultPromise or
107
- this .getReturnType ( ) instanceof PlayMVCResultClass or
99
+ this .getReturnType ( ) instanceof PlayMvcResultClass or
108
100
this .getReturnType ( ) instanceof PlayAsyncResultCompletionStage
109
101
)
110
102
}
111
103
}
112
104
113
105
/**
114
- * Play Action-Method parameters. These are a source of user input
106
+ * The PlayFramework action method parameters, these are a source of user input.
115
107
*
116
- * Example - Class get's `username` & `password` as valid parameters
108
+ * Example - `username` & `password` are marked as valid parameters.
117
109
* ```
118
110
* public class Application extends Controller {
119
111
* public Result index(String username, String password) {
@@ -132,36 +124,32 @@ class PlayActionMethodQueryParameter extends Parameter {
132
124
}
133
125
134
126
/**
135
- * Play Framework HTTPRequestHeader Methods - `headers`, `getQueryString`, `getHeader`
136
- *
137
- * Documentation: https://www.playframework.com/documentation/2.6.0/api/java/play/mvc/Http.RequestHeader.html
127
+ * A PlayFramework HttpRequestHeader method, some of these are `headers`, `getQueryString`, `getHeader`.
138
128
*/
139
- class PlayMVCHTTPRequestHeaderMethods extends Method {
140
- PlayMVCHTTPRequestHeaderMethods ( ) { this .getDeclaringType ( ) instanceof PlayMVCHTTPRequestHeader }
129
+ class PlayMvcHttpRequestHeaderMethods extends Method {
130
+ PlayMvcHttpRequestHeaderMethods ( ) { this .getDeclaringType ( ) instanceof PlayMvcHttpRequestHeader }
141
131
142
132
/**
143
- * Gets all references to play.mvc.HTTP.RequestHeader `getQueryString` method
133
+ * A reference to the `getQueryString` method.
144
134
*/
145
135
MethodAccess getAQueryStringAccess ( ) {
146
136
this .hasName ( "getQueryString" ) and result = this .getAReference ( )
147
137
}
148
138
}
149
139
150
140
/**
151
- * Play Framework mvc.Results Methods - `ok`, `status`, `redirect`
152
- *
153
- * Documentation: https://www.playframework.com/documentation/2.5.8/api/java/play/mvc/Results.html
141
+ * A PlayFramework results method, some of these are `ok`, `status`, `redirect`.
154
142
*/
155
- class PlayMVCResultsMethods extends Method {
156
- PlayMVCResultsMethods ( ) { this .getDeclaringType ( ) instanceof PlayMVCResultsClass }
143
+ class PlayMvcResultsMethods extends Method {
144
+ PlayMvcResultsMethods ( ) { this .getDeclaringType ( ) instanceof PlayMvcResultsClass }
157
145
158
146
/**
159
- * Gets all references to play.mvc.Results `ok` method
147
+ * A reference to the play.mvc.Results `ok` method.
160
148
*/
161
149
MethodAccess getAnOkAccess ( ) { this .hasName ( "ok" ) and result = this .getAReference ( ) }
162
150
163
151
/**
164
- * Gets all references to play.mvc.Results `redirect` method
152
+ * A reference to the play.mvc.Results `redirect` method.
165
153
*/
166
154
MethodAccess getARedirectAccess ( ) { this .hasName ( "redirect" ) and result = this .getAReference ( ) }
167
155
}
0 commit comments