@Test public void testMaterializedLambdaFingerprint() { LambdaIntrospector lambdaIntrospector = new LambdaIntrospector(); String fingerprint = lambdaIntrospector.apply(LambdaPredicate21D56248F6A2E8DA3990031D77D229DD.INSTANCE); assertEquals("4DEB93975D9859892B1A5FD4B38E2155", fingerprint); }
@Override public String apply(Object lambda) { if (lambda.toString().equals("INSTANCE")) { return getExpressionHash(lambda); } if (lambda instanceof Supplier) { lambda = (( Supplier ) lambda).get(); } SerializedLambda extracted = extractLambda( (Serializable) lambda ); String result = getFingerprintsForClass( lambda, extracted ).get( extracted.getImplMethodName() ); if (result == null) { if ( !extracted.getCapturingClass().equals( extracted.getImplClass() ) ) { result = extracted.getCapturingClass().replace( '/', '.' ) + "::" + extracted.getImplMethodName(); } else { throw new UnsupportedOperationException( "Unable to introspect lambda " + lambda ); } } return result; }
LambdaIntrospector implements Function<Object, String> { @Override public String apply(Object lambda) { if (lambda.toString().equals("INSTANCE")) { return getExpressionHash(lambda); } if (lambda instanceof Supplier) { lambda = (( Supplier ) lambda).get(); } SerializedLambda extracted = extractLambda( (Serializable) lambda ); String result = getFingerprintsForClass( lambda, extracted ).get( extracted.getImplMethodName() ); if (result == null) { if ( !extracted.getCapturingClass().equals( extracted.getImplClass() ) ) { result = extracted.getCapturingClass().replace( '/', '.' ) + "::" + extracted.getImplMethodName(); } else { throw new UnsupportedOperationException( "Unable to introspect lambda " + lambda ); } } return result; } }
LambdaIntrospector implements Function<Object, String> { @Override public String apply(Object lambda) { if (lambda.toString().equals("INSTANCE")) { return getExpressionHash(lambda); } if (lambda instanceof Supplier) { lambda = (( Supplier ) lambda).get(); } SerializedLambda extracted = extractLambda( (Serializable) lambda ); String result = getFingerprintsForClass( lambda, extracted ).get( extracted.getImplMethodName() ); if (result == null) { if ( !extracted.getCapturingClass().equals( extracted.getImplClass() ) ) { result = extracted.getCapturingClass().replace( '/', '.' ) + "::" + extracted.getImplMethodName(); } else { throw new UnsupportedOperationException( "Unable to introspect lambda " + lambda ); } } return result; }  }
LambdaIntrospector implements Function<Object, String> { @Override public String apply(Object lambda) { if (lambda.toString().equals("INSTANCE")) { return getExpressionHash(lambda); } if (lambda instanceof Supplier) { lambda = (( Supplier ) lambda).get(); } SerializedLambda extracted = extractLambda( (Serializable) lambda ); String result = getFingerprintsForClass( lambda, extracted ).get( extracted.getImplMethodName() ); if (result == null) { if ( !extracted.getCapturingClass().equals( extracted.getImplClass() ) ) { result = extracted.getCapturingClass().replace( '/', '.' ) + "::" + extracted.getImplMethodName(); } else { throw new UnsupportedOperationException( "Unable to introspect lambda " + lambda ); } } return result; }  @Override String apply(Object lambda); }
LambdaIntrospector implements Function<Object, String> { @Override public String apply(Object lambda) { if (lambda.toString().equals("INSTANCE")) { return getExpressionHash(lambda); } if (lambda instanceof Supplier) { lambda = (( Supplier ) lambda).get(); } SerializedLambda extracted = extractLambda( (Serializable) lambda ); String result = getFingerprintsForClass( lambda, extracted ).get( extracted.getImplMethodName() ); if (result == null) { if ( !extracted.getCapturingClass().equals( extracted.getImplClass() ) ) { result = extracted.getCapturingClass().replace( '/', '.' ) + "::" + extracted.getImplMethodName(); } else { throw new UnsupportedOperationException( "Unable to introspect lambda " + lambda ); } } return result; }  @Override String apply(Object lambda); static final String LAMBDA_INTROSPECTOR_CACHE_SIZE; }