Skip to content

Commit a6f9368

Browse files
committed
Replace all references to CGLib in the documentation with ByteBuddy.
1 parent 6eb69f0 commit a6f9368

File tree

11 files changed

+18
-18
lines changed

11 files changed

+18
-18
lines changed

org.eclipse.wb.core.java/src/org/eclipse/wb/core/eval/ExecutionFlowUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ private static ASTVisitor getInterceptingVisitor(final VisitingContext context,
389389
.getConstructor(VisitingContext.class, ExecutionFlowDescription.class, ExecutionFlowFrameVisitor.class)
390390
.newInstance(context, flowDescription, visitor);
391391
} catch (ReflectiveOperationException e) {
392-
throw new DesignerException(ICoreExceptionConstants.EVAL_CGLIB, e);
392+
throw new DesignerException(ICoreExceptionConstants.EVAL_BYTEBUDDY, e);
393393
}
394394
}
395395

org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/model/creation/ThisCreationSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public Object create(EvaluationContext context, ExecutionFlowFrameVisitor visito
309309
} catch (DesignerException e) {
310310
throw e;
311311
} catch (Throwable e) {
312-
throw new DesignerException(ICoreExceptionConstants.EVAL_CGLIB,
312+
throw new DesignerException(ICoreExceptionConstants.EVAL_BYTEBUDDY,
313313
e,
314314
ReflectionUtils.getShortConstructorString(constructor),
315315
InvocationEvaluator.getArguments_toString(argumentValues),
@@ -357,7 +357,7 @@ private Object create_usingEnhancer(ExecutionFlowFrameVisitor visitor,
357357
ReflectionUtils.setField(instance, MethodInterceptor.FIELD_INTERCEPTOR, PROXY_INTERCEPTOR.get());
358358
return instance;
359359
} catch (ReflectiveOperationException e) {
360-
throw new DesignerException(ICoreExceptionConstants.EVAL_CGLIB, e);
360+
throw new DesignerException(ICoreExceptionConstants.EVAL_BYTEBUDDY, e);
361361
} finally {
362362
PROXY_INTERCEPTOR.set(null);
363363
flowDescription.leaveStatement(m_constructor.getBody());

org.eclipse.wb.core/resources/exceptions.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@
201201
<pre>{3}</pre>
202202
</exception>
203203
<exception id="311" title="Unable to create 'this' component. Non-public constructor.">Your top level
204-
component calls a non-public constructor <code>{0}</code>. Normally, {product_name} uses CGLib to
205-
create a superclass instance. However CGLib can't call non-public constructors (at least in different
204+
component calls a non-public constructor <code>{0}</code>. Normally, {product_name} uses ByteBuddy to
205+
create a superclass instance. However ByteBuddy can't call non-public constructors (at least in different
206206
ClassLoaders), so make the constructor public so that it can be rendered in {product_name}.</exception>
207207
<exception id="312" title="Expression part of invocation is null.">Expression part of invocation
208208
<b>{0}</b> was evaluated into <b>null</b>. Possible reasons and solutions: <ul>

org.eclipse.wb.core/src/org/eclipse/wb/internal/core/utils/exception/ICoreExceptionConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public interface ICoreExceptionConstants {
5555
int EVAL_SUPER_METHOD = 309;
5656
int EVAL_NON_PUBLIC_CONSTRUCTOR = 311;
5757
int EVAL_NULL_INVOCATION_EXPRESSION = 312;
58-
int EVAL_CGLIB = 313;
58+
int EVAL_BYTEBUDDY = 313;
5959
int EVAL_NO_CONSTRUCTOR = 314;
6060
int EVAL_ANONYMOUS = 315;
6161
//int EVAL_UNSUPPORTED_NULL = 306;

org.eclipse.wb.core/src/org/eclipse/wb/internal/core/utils/reflect/ReflectionUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,15 +404,15 @@ public static boolean isMoreSpecific(Class<?> base, Class<?> specific) {
404404
////////////////////////////////////////////////////////////////////////////
405405
/**
406406
* @return <code>true</code> if given {@link Class} that is "enchanced", i.e. is generated by
407-
* "CGLib", or some other library.
407+
* "ByteBuddy", or some other library.
408408
*/
409409
public static boolean isEnchancedClass(Class<?> clazz) {
410410
return clazz.getName().indexOf('$') != -1;
411411
}
412412

413413
/**
414414
* @return the super-Class of given {@link Class} that is "normal", i.e. is not generated by
415-
* "CGLib", or some other library. For now we just check that {@link Class} name has no
415+
* "ByteBuddy", or some other library. For now we just check that {@link Class} name has no
416416
* <code>'$'</code> character.
417417
*/
418418
public static Class<?> getNormalClass(Class<?> clazz) {

org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/utils/ResourceManagerClassLoaderInitializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ private Object createProvider(ClassLoader classLoader, Class<?> providerClass) {
110110
.getConstructor() //
111111
.newInstance();
112112
} catch (ReflectiveOperationException e) {
113-
throw new DesignerException(ICoreExceptionConstants.EVAL_CGLIB, e);
113+
throw new DesignerException(ICoreExceptionConstants.EVAL_BYTEBUDDY, e);
114114
}
115115
}
116116

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/creation/ThisCreationSupportTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,11 +448,11 @@ public void test_create_noSuperConstructor() throws Exception {
448448
}
449449

450450
/**
451-
* We can not use CGLib when superclass has non-public constructor.
451+
* We can not use ByteBuddy when superclass has non-public constructor.
452452
* <p>
453453
* 40274: Can't parse a derived ViewPart
454454
*/
455-
public void test_create_packagePrivateConstructor_forCGLib() throws Exception {
455+
public void test_create_packagePrivateConstructor_forByteBuddy() throws Exception {
456456
setFileContentSrc(
457457
"test/MyPanel.java",
458458
getTestSource(
@@ -504,7 +504,7 @@ public void test_create_exceptionWithDescription() throws Exception {
504504
fail();
505505
} catch (Throwable e) {
506506
DesignerException de = DesignerExceptionUtils.getDesignerException(e);
507-
assertEquals(ICoreExceptionConstants.EVAL_CGLIB, de.getCode());
507+
assertEquals(ICoreExceptionConstants.EVAL_BYTEBUDDY, de.getCode());
508508
}
509509
}
510510

@@ -593,7 +593,7 @@ public void test_create_useDefaultValueForAbstractMethods_String() throws Except
593593
}
594594

595595
/**
596-
* We should not try to intercept "private" methods, because CGLib can not invoke them later.
596+
* We should not try to intercept "private" methods, because ByteBuddy can not invoke them later.
597597
*/
598598
public void test_notInterceptPrivateMethod() throws Exception {
599599
setFileContentSrc(

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/parser/ExecuteOnParseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1599,7 +1599,7 @@ public void test_byteCodeExecutionFlow_disableForClass() throws Exception {
15991599
// refresh
16001600
panel.refresh();
16011601
assertNoErrors(panel);
1602-
// normal class, not enhanced by CGLib
1602+
// normal class, not enhanced by ByteBuddy
16031603
assertFalse(ReflectionUtils.isEnchancedClass(panel.getObject().getClass()));
16041604
}
16051605

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/parser/SwingParserTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ public void test_nonStaticInnerClass() throws Exception {
935935
}
936936

937937
/**
938-
* We can not use CGLib to create non-abstract version of standard Swing class (from system
938+
* We can not use ByteBuddy to create non-abstract version of standard Swing class (from system
939939
* {@link ClassLoader}).
940940
*/
941941
public void test_abstractStandardSwingClass() throws Exception {

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/variables/AbstractVariableSupportTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AbstractVariableSupportTest extends AbstractVariableTest {
3636
//
3737
////////////////////////////////////////////////////////////////////////////
3838
/**
39-
* Create instance of {@link VariableSupport} using CGLib, because {@link VariableSupport} is
39+
* Create instance of {@link VariableSupport} using ByteBuddy, because {@link VariableSupport} is
4040
* abstract, and check its methods.
4141
*/
4242
public void test() throws Exception {

org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/util/reflect/ReflectionUtilsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -830,13 +830,13 @@ public void test_toString_forMethod() throws Exception {
830830
.load(getClass().getClassLoader()) //
831831
.getLoaded();
832832
}
833-
// method "size()" was done by CGLib, but exists in ArrayList, so method from ArrayList returned
833+
// method "size()" was done by ByteBuddy, but exists in ArrayList, so method from ArrayList returned
834834
{
835835
Method method = ReflectionUtils.getMethodBySignature(clazz, "size()");
836836
assertThat(method.toString()).contains("$");
837837
assertEquals("public int java.util.ArrayList.size()", ReflectionUtils.toString(method));
838838
}
839-
// method "__foo__" was generated only in CGLib, so no other method to return
839+
// method "__foo__" was generated only in ByteBuddy, so no other method to return
840840
{
841841
Method method = ReflectionUtils.getMethodBySignature(clazz, "__foo__()");
842842
String usualToString = method.toString();

0 commit comments

Comments
 (0)