Skip to content

Commit ad203c1

Browse files
committed
Add license header; minor style fixes
1 parent 48a5bf0 commit ad203c1

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

src/main/java/gr/gousiosg/javacg/stat/DynamicCallManager.java

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
/*
2+
* Copyright (c) 2018 - Matthieu Vergne <matthieu.vergne@gmail.com>
3+
*
4+
* Redistribution and use in source and binary forms, with or without
5+
* modification, are permitted provided that the following conditions are
6+
* met:
7+
*
8+
* * Redistributions of source code must retain the above copyright
9+
* notice, this list of conditions and the following disclaimer.
10+
*
11+
* * Redistributions in binary form must reproduce the above
12+
* copyright notice, this list of conditions and the following
13+
* disclaimer in the documentation and/or other materials provided
14+
* with the distribution.
15+
*
16+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17+
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18+
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19+
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22+
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23+
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24+
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
*/
28+
129
package gr.gousiosg.javacg.stat;
230

331
import java.util.HashMap;
@@ -38,9 +66,8 @@
3866
* caller) relationships by analyzing the code of the caller {@link Method}.
3967
* This information is then used in {@link #linkCalls(Method)} to rename the
4068
* called {@link Method} properly.
41-
*
42-
* @author Matthieu Vergne <matthieu.vergne@gmail.com>
4369
*
70+
* @author Matthieu Vergne <matthieu.vergne@gmail.com>
4471
*/
4572
public class DynamicCallManager {
4673
private static final Pattern BOOTSTRAP_CALL_PATTERN = Pattern
@@ -52,11 +79,9 @@ public class DynamicCallManager {
5279
/**
5380
* Retrieve dynamic call relationships based on the code of the provided
5481
* {@link Method}.
55-
*
56-
* @param method
57-
* {@link Method} to analyze the code
58-
* @param jc
59-
* {@link JavaClass} info, which contains the bootstrap methods
82+
*
83+
* @param method {@link Method} to analyze the code
84+
* @param jc {@link JavaClass} info, which contains the bootstrap methods
6085
* @see #linkCalls(Method)
6186
*/
6287
public void retrieveCalls(Method method, JavaClass jc) {
@@ -87,9 +112,8 @@ private String getMethodNameFromHandleIndex(ConstantPool cp, int callIndex) {
87112

88113
/**
89114
* Link the {@link Method}'s name to its concrete caller if required.
90-
*
91-
* @param method
92-
* {@link Method} to analyze
115+
*
116+
* @param method {@link Method} to analyze
93117
* @see #retrieveCalls(Method, JavaClass)
94118
*/
95119
public void linkCalls(Method method) {
@@ -111,6 +135,6 @@ private BootstrapMethod[] getBootstrapMethods(JavaClass jc) {
111135
return ((BootstrapMethods) attribute).getBootstrapMethods();
112136
}
113137
}
114-
return new BootstrapMethod[] {};
138+
return new BootstrapMethod[]{};
115139
}
116140
}

0 commit comments

Comments
 (0)