Home | History | Annotate | Download | only in invoke

Lines Matching defs:methodType

56  * All instances of {@code MethodType} are immutable.
71 * {@code MethodType} objects are sometimes derived from bytecode instructions
83 * When the JVM materializes a {@code MethodType} from a descriptor string,
86 * This loading may occur at any time before the {@code MethodType} object is first derived.
90 class MethodType implements java.io.Serializable {
99 private @Stable MethodType wrapAlt; // alternative wrapped/unwrapped version
108 private MethodType(Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
117 * Construct a temporary unchecked instance of MethodType for use only as a key to the intern table.
121 private MethodType(Class<?>[] ptypes, Class<?> rtype) {
196 static final ConcurrentWeakInternSet<MethodType> internTable = new ConcurrentWeakInternSet<>();
209 MethodType methodType(Class<?> rtype, Class<?>[] ptypes) {
215 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
223 MethodType methodType(Class<?> rtype, List<Class<?>> ptypes) {
236 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
246 MethodType methodType(Class<?> rtype, Class<?> ptype0, Class<?>... ptypes) {
255 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
262 MethodType methodType(Class<?> rtype) {
268 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
277 MethodType methodType(Class<?> rtype, Class<?> ptype0) {
283 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
292 MethodType methodType(Class<?> rtype, MethodType ptypes) {
304 MethodType makeImpl(Class<?> rtype, Class<?>[] ptypes, boolean trusted) {
305 MethodType mt = internTable.get(new MethodType(ptypes, rtype));
311 mt = new MethodType(rtype, ptypes, trusted);
316 private static final MethodType[] objectOnlyTypes = new MethodType[20];
320 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
330 MethodType genericMethodType(int objectArgCount, boolean finalArray) {
331 MethodType mt;
351 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
359 MethodType genericMethodType(int objectArgCount) {
365 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
373 public MethodType changeParameterType(int num, Class<?> nptype) {
383 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
392 public MethodType insertParameterTypes(int num, Class<?>... ptypesToInsert) {
408 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
415 public MethodType appendParameterTypes(Class<?>... ptypesToInsert) {
421 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
430 public MethodType insertParameterTypes(int num, List<Class<?>> ptypesToInsert) {
436 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
443 public MethodType appendParameterTypes(List<Class<?>> ptypesToInsert) {
449 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
461 /*non-public*/ MethodType replaceParameterTypes(int start, int end, Class<?>... ptypesToInsert) {
478 /*non-public*/ MethodType asSpreaderType(Class<?> arrayType, int arrayLength) {
486 MethodType res = genericMethodType(arrayLength);
499 return methodType(rtype, fixedPtypes);
521 /*non-public*/ MethodType asCollectorType(Class<?> arrayType, int arrayLength) {
524 MethodType res;
533 res = methodType(rtype, Collections.nCopies(arrayLength, elemType));
544 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
552 public MethodType dropParameterTypes(int start, int end) {
581 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
586 public MethodType changeReturnType(Class<?> nrtype) {
613 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
617 public MethodType erase() {
627 /*non-public*/ MethodType basicType() {
634 /*non-public*/ MethodType invokerType() {
645 public MethodType generic() {
655 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
662 public MethodType wrap() {
668 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
673 public MethodType unwrap() {
674 MethodType
678 private static MethodType wrapWithPrims(MethodType pt) {
680 MethodType wt = pt.wrapAlt;
690 private static MethodType unwrapWithNoPrims(MethodType wt) {
692 MethodType uwt = wt.wrapAlt;
759 return this == x || x instanceof MethodType && equals((MethodType)x);
762 private boolean equals(MethodType that) {
812 // boolean isViewableAs(MethodType newType, boolean keepInterfaces);
813 // boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces);
815 boolean isConvertibleTo(MethodType newType) {
849 boolean explicitCastEquivalentToAsType(MethodType newType) {
988 * Convenience method for {@link #methodType(java.lang.Class, java.lang.Class[]) methodType}.
1006 public static MethodType fromMethodDescriptorString(String descriptor, ClassLoader loader)
1049 * There are no serializable fields for {@code MethodType}.
1054 * Save the {@code MethodType} instance to a stream.
1067 * provided to the factory method {@link #methodType(Class,Class[]) methodType}.
1080 * Reconstitute the {@code MethodType} instance from a stream (that is,
1089 * @see #MethodType()
1112 private MethodType() {
1130 (MethodType.class.getDeclaredField("rtype"));
1132 (MethodType.class.getDeclaredField("ptypes"));
1139 * Resolves and initializes a {@code MethodType} object
1141 * @return the fully initialized {@code MethodType} object
1147 return methodType(rtype, ptypes);