-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
898 changed files
with
2,832 additions
and
334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2016-2018 Testify Project. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.testifyproject.external</groupId> | ||
<artifactId>external</artifactId> | ||
<version>1.0.2</version> | ||
</parent> | ||
|
||
<artifactId>external-asm</artifactId> | ||
|
||
<properties> | ||
<asm.version>5.2</asm.version> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<configuration> | ||
<relocations> | ||
<relocation> | ||
<pattern>org.objectweb.asm</pattern> | ||
<shadedPattern>org.testifyproject.asm</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-all</artifactId> | ||
<version>${asm.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
26 changes: 26 additions & 0 deletions
26
external/external-asm/src/main/java/org/testifyproject/asm/Dummy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright 2016-2017 Testify Project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.testifyproject.asm; | ||
|
||
/** | ||
* This is a dummy class info to satisfy SonaType rules requiring artifacts to | ||
* have javadoc/source attachment. | ||
* | ||
* @author saden | ||
*/ | ||
public class Dummy { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Developer Notes | ||
|
||
## Troubleshooting Ambiguity Issues | ||
- There have been issues in the past with ambiguity resolution not working. To debug and report these issues to ByteBuddy team start the debugging process by looking at | ||
- `MethodDelegationBinder$Processor#bind` | ||
- `MethodDelegationBinder$Default#doResolve` | ||
- Make sure you interceptor method signatures are correct: | ||
- Methods that don't take parameters cant have a parameter annotated with `@AllArguments` | ||
- Static methods can't have a parameter annotated with `@This` unless its optional attribute is set | ||
- Catch all methods must have different parameter lengths than any other declared method. | ||
- Catch-method should look like this: | ||
```java | ||
@RuntimeType | ||
@BindingPriority(Integer.MAX_VALUE) | ||
public Object anyMethod(@SuperCall Callable<?> zuper, @This(optional = true) Object object) | ||
throws Exception { | ||
return zuper.call(); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright 2016-2018 Testify Project. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.testifyproject.external</groupId> | ||
<artifactId>external</artifactId> | ||
<version>1.0.2</version> | ||
</parent> | ||
|
||
<artifactId>external-bytebuddy</artifactId> | ||
|
||
<properties> | ||
<bytebuddy.version>1.7.6</bytebuddy.version> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<configuration> | ||
<relocations> | ||
<relocation> | ||
<pattern>net.bytebuddy</pattern> | ||
<shadedPattern>org.testifyproject.bytebuddy</shadedPattern> | ||
</relocation> | ||
</relocations> | ||
<transformers> | ||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> | ||
<manifestEntries> | ||
<Agent-Class>org.testifyproject.bytebuddy.agent.Installer</Agent-Class> | ||
<Premain-Class>org.testifyproject.bytebuddy.agent.Installer</Premain-Class> | ||
<Can-Redefine-Classes>true</Can-Redefine-Classes> | ||
<Can-Retransform-Classes>true</Can-Retransform-Classes> | ||
<Can-Set-Native-Method-Prefix>true</Can-Set-Native-Method-Prefix> | ||
</manifestEntries> | ||
</transformer> | ||
</transformers> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>net.bytebuddy</groupId> | ||
<artifactId>byte-buddy</artifactId> | ||
<version>${bytebuddy.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>net.bytebuddy</groupId> | ||
<artifactId>byte-buddy-agent</artifactId> | ||
<version>${bytebuddy.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> |
34 changes: 34 additions & 0 deletions
34
external/external-bytebuddy/src/main/java/org/testifyproject/bytebuddy/Morpher.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2016-2017 Testify Project. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package org.testifyproject.bytebuddy; | ||
|
||
/** | ||
* A contract that enables the substitution of parameters passed to super method using | ||
* {@code net.bytebuddy.implementation.bind.annotation.Morph} annotation. | ||
* | ||
* @author saden | ||
* @param <T> the super call return type | ||
*/ | ||
public interface Morpher<T> { | ||
|
||
/** | ||
* Invoke the morph method using the given parameters. | ||
* | ||
* @param arguments the arguments passed to the super call | ||
* @return the result returned from the super call. | ||
*/ | ||
T morph(Object... arguments); | ||
} |
Oops, something went wrong.