You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Creates a proxy object using <code>java.lang.reflect.Proxy</code> based on the provided Java object and the classes of the implemented Java interfaces.
68
-
* <p>
69
47
* <p>If <code>JProxy</code> has been configured and is enabled this method returns a <code>java.lang.reflect.Proxy</code> object implementing instead of
70
48
* the original object provided. Methods called in proxy object are received by <code>JProxy</code> and forwarded to the original object, if source code
71
49
* managed by <code>JProxy</code> has been changed, the class of the original object is reloaded based on the new source and the original object
72
50
* is recreated with the new class and fields are re-set in the new object, then the method is called on the new original object.</p>
73
-
* <p>
74
51
* <p>If <code>JProxy</code> is disabled returns the original object provided with no performance penalty.</p>
* Informs whether <code>JProxy</code> is configured and enabled.
87
83
*
@@ -100,23 +96,9 @@ public static boolean isRunning() {
100
96
returnJProxyDefaultImpl.isRunningStatic();
101
97
}
102
98
103
-
/**
104
-
* Stops source code periodic change detection.
105
-
* <p>
106
-
* <p>Periodicity of change detection is defined by {@link JProxyConfig#setScanPeriod(long)}</p>
107
-
*
108
-
* @return true if source change detection has been stopped, false if it is already stopped or <code>JProxy</code> is not enabled or initialized.
109
-
* @see #stop()
110
-
*/
111
-
publicstaticbooleanstop() {
112
-
returnJProxyDefaultImpl.stopStatic();
113
-
}
114
-
115
99
/**
116
100
* Starts source code periodic change detection.
117
-
* <p>
118
101
* <p>Periodicity of change detection is defined by {@link JProxyConfig#setScanPeriod(long)}.</p>
119
-
* <p>
120
102
* <p>By default when <code>JProxy</code> is initialized and enabled.</p>
121
103
*
122
104
* @return true if source change detection has been started again, false if it is already started or cannot start because <code>JProxy</code> is not enabled or initialized or scan period is not positive.
@@ -125,4 +107,15 @@ public static boolean stop() {
125
107
publicstaticbooleanstart() {
126
108
returnJProxyDefaultImpl.startStatic();
127
109
}
110
+
111
+
/**
112
+
* Stops source code periodic change detection.
113
+
* <p>Periodicity of change detection is defined by {@link JProxyConfig#setScanPeriod(long)}</p>
114
+
*
115
+
* @return true if source change detection has been stopped, false if it is already stopped or <code>JProxy</code> is not enabled or initialized.
* Sets the compilation options to be provided to the compiler built-in in JDK like <code>JavaCompiler.getTask()</code> method and the same you would provide to javac.
* Sets whether automatic detection of source code changes is enabled.
36
-
* <p>
37
58
* <p>If set to false other configuration parameters are ignored, there is no automatic source code change detection/reload and original objects are returned
38
59
* instead of proxies, performance penalty is zero. Setting to false is recommended in production whether source code change detection/reload is not required.</p>
39
60
*
@@ -43,21 +64,13 @@ public interface JProxyConfig {
43
64
@NotNull
44
65
JProxyConfigsetEnabled(booleanenabled);
45
66
46
-
/**
47
-
* Sets the class reload listener.
48
-
*
49
-
* @param relListener the class reload listener. By default is null.
* Defines the extra required jars providing the absolute paths to them.
88
-
* <p>
89
-
* <p>In some circunstances RelProxy is not able to find some required classes by the compiler because the jar containing them is not found in spite of existing in classpath,
90
-
* the reason may be due some conflictive configuration of <code>META-INF/MANIFEST.MF</code> of the jar. This problem can be fixed modifying accordingly the <code>META-INF/MANIFEST.MF</code>
91
-
* file, or alternatively providing the paths to the conflictive jars calling to this method, in this case RelProxy will find the required classes searching on them by using brute force
92
-
* avoiding the jar modification (not recommended).
93
-
* </p>
94
-
*
95
-
* @param inputJarPaths the paths of the required extra jars.
* Registers the listener implementing excluding rules to filter source files not to be part of the hot reloading system in spite of included in input paths.
104
-
*
105
-
* @param listener the listener. By default is null.
* Sets the delay between source code change checking.
136
-
* <p>
137
-
* <p>If this value is set to 0 or negative, no periodic source code change detection is executed and only compilation on the fly happens in load time,
138
-
* this is valid for one shot scripts but it has no sense when using proxies.
139
-
*
140
-
* @param scanPeriod the delay between source code change checking.
141
-
* @return this object for flow API use.
142
-
*/
143
-
@NotNull
144
-
JProxyConfigsetScanPeriod(longscanPeriod);
145
-
146
-
/**
147
-
* Sets the compilation options to be provided to the compiler built-in in JDK like <code>JavaCompiler.getTask()</code> method and the same you would provide to javac.
* Registers the listener implementing excluding rules to filter source files not to be part of the hot reloading system in spite of included in input paths.
143
+
*
144
+
* @param listener the listener. By default is null.
* Defines the extra required jars providing the absolute paths to them.
161
+
* <p>In some circunstances RelProxy is not able to find some required classes by the compiler because the jar containing them is not found in spite of existing in classpath,
162
+
* the reason may be due some conflictive configuration of <code>META-INF/MANIFEST.MF</code> of the jar. This problem can be fixed modifying accordingly the <code>META-INF/MANIFEST.MF</code>
163
+
* file, or alternatively providing the paths to the conflictive jars calling to this method, in this case RelProxy will find the required classes searching on them by using brute force
164
+
* avoiding the jar modification (not recommended).
165
+
* </p>
166
+
*
167
+
* @param inputJarPaths the paths of the required extra jars.
0 commit comments