Searched refs:sourceType (Results 1 - 20 of 20) sorted by relevance

/openjdk10/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/
H A DConversionComparator.java113 * @param sourceType the source type.
119 public Comparison compareConversion(Class<?> sourceType, Class<?> targetType1, Class<?> targetType2); argument
H A DGuardingTypeConverterFactory.java111 * The type of the invocation is <code>(sourceType)&rarr;targetType</code>, while the
112 * type of the guard is <code>(sourceType)&rarr;boolean</code>. You are allowed to
128 * @param sourceType source type
154 public GuardedInvocation convertToType(Class<?> sourceType, Class<?> targetType, Supplier<MethodHandles.Lookup> lookupSupplier) throws Exception; argument
H A DLinkerServices.java157 * @param sourceType the type to convert from
161 public MethodHandle getTypeConverter(Class<?> sourceType, Class<?> targetType); argument
202 * @param sourceType the source type.
208 public Comparison compareConversion(Class<?> sourceType, Class<?> targetType1, Class<?> targetType2); argument
/openjdk10/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/linker/support/
H A DTypeUtilities.java143 * @param sourceType the type being converted from (call site type for parameter types, method type for return types)
147 public static boolean isMethodInvocationConvertible(final Class<?> sourceType, final Class<?> targetType) { argument
148 if(targetType.isAssignableFrom(sourceType)) {
151 if(sourceType.isPrimitive()) {
153 return isProperPrimitiveSubtype(sourceType, targetType);
155 return isBoxingAndWideningReferenceConversion(sourceType, targetType);
158 final Class<?> unboxedCallSiteType = getPrimitiveType(sourceType);
165 private static boolean isBoxingAndWideningReferenceConversion(final Class<?> sourceType, final Class<?> targetType) { argument
166 final Class<?> wrapperType = getWrapperType(sourceType);
167 assert wrapperType != null : sourceType
186 isConvertibleWithoutLoss(final Class<?> sourceType, final Class<?> targetType) argument
[all...]
/openjdk10/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/
H A DTypeConverterFactory.java121 protected ClassMap<MethodHandle> computeValue(final Class<?> sourceType) {
122 return new ClassMap<MethodHandle>(getClassLoader(sourceType)) {
126 return createConverter(sourceType, targetType);
139 protected ClassMap<MethodHandle> computeValue(final Class<?> sourceType) {
140 return new ClassMap<MethodHandle>(getClassLoader(sourceType)) {
143 if(!canAutoConvert(sourceType, targetType)) {
144 final MethodHandle converter = getCacheableTypeConverter(sourceType, targetType);
149 return IDENTITY_CONVERSION.asType(MethodType.methodType(targetType, sourceType));
157 protected ClassMap<Boolean> computeValue(final Class<?> sourceType) {
158 return new ClassMap<Boolean>(getClassLoader(sourceType)) {
318 compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) argument
346 getCacheableTypeConverterNull(final Class<?> sourceType, final Class<?> targetType) argument
351 getTypeConverterNull(final Class<?> sourceType, final Class<?> targetType) argument
359 getCacheableTypeConverter(final Class<?> sourceType, final Class<?> targetType) argument
372 getTypeConverter(final Class<?> sourceType, final Class<?> targetType) argument
397 createConverter(final Class<?> sourceType, final Class<?> targetType) argument
[all...]
H A DLinkerServicesImpl.java135 public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) { argument
136 return typeConverterFactory.getTypeConverter(sourceType, targetType);
140 public Comparison compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) { argument
141 return typeConverterFactory.compareConversion(sourceType, targetType1, targetType2);
/openjdk10/nashorn/src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/linker/
H A DNashornPrimitiveLinker.java76 * @param sourceType the type to convert from
81 public GuardedInvocation convertToType(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) { argument
84 if(targetType == Object.class && sourceType == void.class) {
90 return new GuardedInvocation(mh, canLinkTypeStatic(sourceType) ? null : GUARD_PRIMITIVE).asType(mh.type().changeParameterType(0, sourceType));
96 * @param sourceType the source type to convert from
103 public Comparison compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) { argument
105 if (sourceType == wrapper1) {
110 if (sourceType == wrapper2) {
115 if (Number.class.isAssignableFrom(sourceType)) {
[all...]
H A DNashornLinker.java115 public GuardedInvocation convertToType(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) throws Exception { argument
116 GuardedInvocation gi = convertToTypeNoCast(sourceType, targetType, lookupSupplier);
118 gi = getSamTypeConverter(sourceType, targetType, lookupSupplier);
120 return gi == null ? null : gi.asType(MH.type(targetType, sourceType));
128 * @param sourceType the source type
133 private static GuardedInvocation convertToTypeNoCast(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) throws Exception { argument
136 return new GuardedInvocation(mh, canLinkTypeStatic(sourceType) ? null : IS_NASHORN_OR_UNDEFINED_TYPE);
139 final GuardedInvocation arrayConverter = getArrayConverter(sourceType, targetType, lookupSupplier);
144 return getMirrorConverter(sourceType, targetType);
150 * @param sourceType th
158 getSamTypeConverter(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) argument
193 getArrayConverter(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) argument
255 getMirrorConverter(final Class<?> sourceType, final Class<?> targetType) argument
286 compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) argument
[all...]
H A DNashornBeansLinker.java263 public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) { argument
264 return linkerServices.getTypeConverter(sourceType, targetType);
278 public Comparison compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) { argument
279 if (sourceType == ConsString.class) {
288 return linkerServices.compareConversion(sourceType, targetType1, targetType2);
H A DNashornBottomLinker.java175 public GuardedInvocation convertToType(final Class<?> sourceType, final Class<?> targetType, final Supplier<MethodHandles.Lookup> lookupSupplier) throws Exception { argument
176 final GuardedInvocation gi = convertToTypeNoCast(sourceType, targetType);
177 return gi == null ? null : gi.asType(MH.type(targetType, sourceType));
184 * @param sourceType the source type
189 private static GuardedInvocation convertToTypeNoCast(final Class<?> sourceType, final Class<?> targetType) throws Exception { argument
H A DJavaSuperAdapterLinker.java149 * @param sourceType the source method type for filtering
152 private static MethodHandle asFilterType(final MethodHandle filter, final int pos, final MethodType targetType, final MethodType sourceType) { argument
153 return filter.asType(MethodType.methodType(targetType.parameterType(pos), sourceType.parameterType(pos)));
H A DJavaAdapterFactory.java180 * @param sourceType the source type; should be either {@link ScriptObject},
192 public static MethodHandle getConstructor(final Class<?> sourceType, final Class<?> targetType, final MethodHandles.Lookup lookup) throws Exception { argument
196 MethodType.methodType(targetType, StaticClass.class, sourceType)), false,
/openjdk10/nashorn/src/jdk.dynalink/share/classes/jdk/dynalink/beans/
H A DLinkerServicesWithMissingMemberHandlerFactory.java59 public MethodHandle getTypeConverter(final Class<?> sourceType, final Class<?> targetType) { argument
60 return linkerServices.getTypeConverter(sourceType, targetType);
74 public Comparison compareConversion(final Class<?> sourceType, final Class<?> targetType1, final Class<?> targetType2) { argument
75 return linkerServices.compareConversion(sourceType, targetType1, targetType2);
H A DBeanLinker.java339 final Class<?> sourceType = desc.getMethodType().parameterType(1);
340 if(TypeUtilities.isMethodInvocationConvertible(sourceType, Number.class)) {
342 } else if(ls.canConvert(sourceType, Number.class)) {
343 final MethodHandle converter = ls.getTypeConverter(sourceType, Number.class);
/openjdk10/jdk/src/java.desktop/share/classes/sun/java2d/loops/
H A DGraphicsPrimitive.java115 private SurfaceType sourceType; field in class:GraphicsPrimitive
145 SurfaceType sourceType,
150 this.sourceType = sourceType;
154 if(sourceType == null || compositeType == null || destType == null) {
158 sourceType,
171 SurfaceType sourceType,
177 this.sourceType = sourceType;
181 if(sourceType
143 GraphicsPrimitive(String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType) argument
168 GraphicsPrimitive(long pNativePrim, String methodSignature, int primTypeID, SurfaceType sourceType, CompositeType compositeType, SurfaceType destType) argument
[all...]
/openjdk10/nashorn/test/script/basic/
H A Djavaarrayconversion.js131 function assertCanConvert(sourceType, targetType) {
132 Java.to([new (Java.type(sourceType))()], targetType + "[]")
136 function assertCantConvert(sourceType, targetType) {
138 Java.to([new (Java.type(sourceType))()], targetType + "[]")
/openjdk10/jdk/test/java/util/Scanner/
H A DScanTest.java436 public static void hasNextLineTest(int sourceType) throws Exception { argument
437 Scanner sc = scannerFor("1\n2\n3 3\r\n4 4 4\r5", sourceType);
474 public static void nextLineTest(int sourceType) throws Exception { argument
475 Scanner sc = scannerFor("1\n2\n3 3\r\n4 4 4\r5", sourceType);
500 public static void singleDelimTest(int sourceType) throws Exception { argument
502 sourceType);
764 public static void bigIntegerPatternTest(int sourceType) throws Exception { argument
765 Scanner sc = scannerFor("23 9223372036854775817", sourceType);
800 public static void bigDecimalPatternTest(int sourceType) throws Exception { argument
801 Scanner sc = scannerFor("23 45.99 -45,067.444 3.4e10", sourceType);
813 integerPatternTest(int sourceType) argument
862 floatPatternTest(int sourceType) argument
1064 byteTest(int sourceType) argument
1133 shortTest(int sourceType) argument
1166 intTest(int sourceType) argument
1199 longTest(int sourceType) argument
1229 floatTest(int sourceType) argument
1274 doubleTest(int sourceType) argument
1319 booleanTest(int sourceType) argument
1338 hasNextTest(int sourceType) argument
1366 nextTest(int sourceType) argument
1387 hasNextPatternTest(int sourceType) argument
1414 nextPatternTest(int sourceType) argument
1674 scannerFor(String input, int sourceType) argument
[all...]
/openjdk10/hotspot/src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/
H A DBasicArrayCopyNode.java226 ResolvedJavaType sourceType = StampTool.typeOrNull(srcAlias);
227 if (sourceType == null || !sourceType.isArray()) {
230 ResolvedJavaType sourceComponentType = sourceType.getComponentType();
/openjdk10/jdk/src/demo/share/java2d/J2DBench/src/j2dbench/tests/cmm/
H A DColorConvertOpTests.java150 protected static Option sourceType; field in class:ColorConvertOpTests
193 sourceType = createImageTypeList(ListType.SRC);
246 ImageType srcType = (ImageType)env.getModifier(sourceType);
/openjdk10/jdk/src/java.base/share/classes/sun/invoke/util/
H A DWrapper.java499 Class<?> sourceType = x.getClass(); // throw NPE if x is null
500 Wrapper source = findWrapperType(sourceType);
502 throw newClassCastException(wtype, sourceType);

Completed in 243 milliseconds