|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
package java.lang.invoke; |
|
|
|
import static java.lang.invoke.LambdaForm.BasicType.*; |
|
import static java.lang.invoke.MethodHandleStatics.*; |
|
|
|
|
|
|
|
|
|
*/ |
|
final class SimpleMethodHandle extends BoundMethodHandle { |
|
private SimpleMethodHandle(MethodType type, LambdaForm form) { |
|
super(type, form); |
|
} |
|
|
|
static BoundMethodHandle make(MethodType type, LambdaForm form) { |
|
return new SimpleMethodHandle(type, form); |
|
} |
|
|
|
static final SpeciesData SPECIES_DATA = SpeciesData.EMPTY; |
|
|
|
public SpeciesData speciesData() { |
|
return SPECIES_DATA; |
|
} |
|
|
|
@Override |
|
BoundMethodHandle copyWith(MethodType mt, LambdaForm lf) { |
|
return make(mt, lf); |
|
} |
|
|
|
@Override |
|
String internalProperties() { |
|
return "\n& Class="+getClass().getSimpleName(); |
|
} |
|
|
|
@Override |
|
public int fieldCount() { |
|
return 0; |
|
} |
|
|
|
@Override |
|
final BoundMethodHandle copyWithExtendL(MethodType mt, LambdaForm lf, Object narg) { |
|
return BoundMethodHandle.bindSingle(mt, lf, narg); |
|
} |
|
@Override |
|
final BoundMethodHandle copyWithExtendI(MethodType mt, LambdaForm lf, int narg) { |
|
try { |
|
return (BoundMethodHandle) SPECIES_DATA.extendWith(I_TYPE).constructor().invokeBasic(mt, lf, narg); |
|
} catch (Throwable ex) { |
|
throw uncaughtException(ex); |
|
} |
|
} |
|
@Override |
|
final BoundMethodHandle copyWithExtendJ(MethodType mt, LambdaForm lf, long narg) { |
|
try { |
|
return (BoundMethodHandle) SPECIES_DATA.extendWith(J_TYPE).constructor().invokeBasic(mt, lf, narg); |
|
} catch (Throwable ex) { |
|
throw uncaughtException(ex); |
|
} |
|
} |
|
@Override |
|
final BoundMethodHandle copyWithExtendF(MethodType mt, LambdaForm lf, float narg) { |
|
try { |
|
return (BoundMethodHandle) SPECIES_DATA.extendWith(F_TYPE).constructor().invokeBasic(mt, lf, narg); |
|
} catch (Throwable ex) { |
|
throw uncaughtException(ex); |
|
} |
|
} |
|
@Override |
|
final BoundMethodHandle copyWithExtendD(MethodType mt, LambdaForm lf, double narg) { |
|
try { |
|
return (BoundMethodHandle) SPECIES_DATA.extendWith(D_TYPE).constructor().invokeBasic(mt, lf, narg); |
|
} catch (Throwable ex) { |
|
throw uncaughtException(ex); |
|
} |
|
} |
|
} |