generated from JetBrains/intellij-platform-plugin-template
-
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.
test: add tests for MethodType methods (#37)
- Loading branch information
Showing
14 changed files
with
117 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeAppendParameterTypes { | ||
<info descr="(boolean,String,double)int">private static final MethodType A = <info descr="(boolean,String,double)int"><info descr="(boolean)int">MethodType.methodType(int.class, boolean.class)</info>.appendParameterTypes(String.class, double.class)</info>;</info> | ||
} |
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,8 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeChangeParameterType { | ||
<info descr="(double,int)void">private static final MethodType A = <info descr="(double,int)void"><info descr="(boolean,int)void">MethodType.methodType(void.class, boolean.class, int.class)</info>.changeParameterType(0, double.class)</info>;</info> | ||
<info descr="(boolean,double)void">private static final MethodType B = <info descr="(boolean,double)void"><info descr="(boolean,int)void">MethodType.methodType(void.class, boolean.class, int.class)</info>.changeParameterType(1, double.class)</info>;</info> | ||
} |
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,8 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeChangeReturnType { | ||
<info descr="(boolean,int)double">private static final MethodType A = <info descr="(boolean,int)double"><info descr="(boolean,int)void">MethodType.methodType(void.class, boolean.class, int.class)</info>.changeReturnType(double.class)</info>;</info> | ||
<info descr="()double">private static final MethodType B = <info descr="()double"><info descr="()int">MethodType.methodType(int.class)</info>.changeReturnType(double.class)</info>;</info> | ||
} |
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,8 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeWrap { | ||
<info descr="()void">private static final MethodType A = <info descr="()void">MethodType.methodType(void.class)</info>;</info> | ||
<info descr="(String)int">private static final MethodType B = <info descr="(String)int">MethodType.methodType(int.class, String.class)</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeWrap { | ||
<info descr="(int,float)void">private static final MethodType A = <info descr="(int,float)void">MethodType.methodType(void.class, <info descr="(int,float)String">MethodType.methodType(String.class, int.class, float.class)</info>)</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeDropParameterTypes { | ||
<info descr="(boolean,float,long)void">private static final MethodType A = <info descr="(boolean,float,long)void"><info descr="(boolean,int,double,float,long)void">MethodType.methodType(void.class, boolean.class, int.class, double.class, float.class, long.class)</info>.dropParameterTypes(1, 3)</info>;</info> | ||
} |
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,5 @@ | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeErase { | ||
<info descr="(Object,int,double,Object,Object)void">private static final MethodType A = <info descr="(Object,int,double,Object,Object)void"><info descr="(String,int,double,Object,Integer)void">MethodType.methodType(void.class, String.class, int.class, double.class, Object.class, Integer.class)</info>.erase()</info>;</info> | ||
} |
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,5 @@ | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeGeneric { | ||
<info descr="(Object,Object,Object,Object,Object)Object">private static final MethodType A = <info descr="(Object,Object,Object,Object,Object)Object"><info descr="(String,int,double,Object,long)void">MethodType.methodType(void.class, String.class, int.class, double.class, Object.class, long.class)</info>.generic()</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeGenericMethodType { | ||
<info descr="(Object,Object,Object)Object">private static final MethodType A = <info descr="(Object,Object,Object)Object">MethodType.genericMethodType(3)</info>;</info> | ||
<info descr="(Object,Object,Object,Object,Object[])Object">private static final MethodType B = <info descr="(Object,Object,Object,Object,Object[])Object">MethodType.genericMethodType(4, true)</info>;</info> | ||
<info descr="(Object,Object,Object,Object,Object)Object">private static final MethodType C = <info descr="(Object,Object,Object,Object,Object)Object">MethodType.genericMethodType(5, false)</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeInsertParameterTypes { | ||
<info descr="(boolean,int,double,float,long)void">private static final MethodType A = <info descr="(boolean,int,double,float,long)void"><info descr="(boolean,float,long)void">MethodType.methodType(void.class, boolean.class, float.class, long.class)</info>.insertParameterTypes(1, int.class, double.class)</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeUnwrap { | ||
<info descr="(boolean,String,double)int">private static final MethodType A = <info descr="(boolean,String,double)int"><info descr="(Boolean,String,Double)Integer">MethodType.methodType(Integer.class, Boolean.class, String.class, Double.class)</info>.unwrap()</info>;</info> | ||
} |
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,7 @@ | ||
import java.lang.invoke.MethodHandle; | ||
import java.lang.invoke.MethodHandles; | ||
import java.lang.invoke.MethodType; | ||
|
||
class MethodTypeWrap { | ||
<info descr="(Boolean,String,Double)Integer">private static final MethodType A = <info descr="(Boolean,String,Double)Integer"><info descr="(boolean,String,double)int">MethodType.methodType(int.class, boolean.class, String.class, double.class)</info>.wrap()</info>;</info> | ||
} |