com.zaxxer.hikari.util.PropertyElf.class Maven / Gradle / Ivy
???? 4? "com/zaxxer/hikari/util/PropertyElf java/lang/Object PropertyElf.java %java/lang/invoke/MethodHandles$Lookup java/lang/invoke/MethodHandles Lookup GETTER_PATTERN Ljava/util/regex/Pattern; ()V
this $Lcom/zaxxer/hikari/util/PropertyElf; setTargetFromProperties +(Ljava/lang/Object;Ljava/util/Properties;)V getClass ()Ljava/lang/Class;
java/lang/Class
getMethods ()[Ljava/lang/reflect/Method;
java/util/Arrays asList %([Ljava/lang/Object;)Ljava/util/List; ! "
# '(Ljava/lang/Object;Ljava/lang/Object;)V % lambda$setTargetFromProperties$0 I(Ljava/lang/Object;Ljava/util/List;Ljava/lang/Object;Ljava/lang/Object;)V ' (
) * "java/lang/invoke/LambdaMetafactory , metafactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; . /
- 0 1 accept C(Ljava/lang/Object;Ljava/util/List;)Ljava/util/function/BiConsumer; 3 4 5 java/util/Properties 7 forEach "(Ljava/util/function/BiConsumer;)V 9 :
8 ; target Ljava/lang/Object;
properties Ljava/util/Properties; methods ,Ljava/util/List; Ljava/util/List; getPropertyNames "(Ljava/lang/Class;)Ljava/util/Set; 9(Ljava/lang/Class<*>;)Ljava/util/Set; java/lang/Exception G java/util/HashSet I
J L N java/util/regex/Pattern P matcher 3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; R S
Q T java/util/regex/Matcher V [Ljava/lang/reflect/Method; X java/lang/reflect/Method Z getName ()Ljava/lang/String; \ ]
[ ^ getParameterTypes ()[Ljava/lang/Class; ` a
[ b reset d S
W e matches ()Z g h
W i (get|is) k java/lang/String m replaceFirst 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; o p
n q java/lang/StringBuilder s
t set v append -(Ljava/lang/String;)Ljava/lang/StringBuilder; x y
t z toString | ]
t }
getReturnType
[ ? getMethod @(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; ? ?
? charAt (I)C ? ?
n ? java/lang/Character ? toLowerCase (C)C ? ?
? ? (C)Ljava/lang/StringBuilder; x ?
t ? substring (I)Ljava/lang/String; ? ?
n ? add (Ljava/lang/Object;)Z ? ?
J ? name Ljava/lang/String; method Ljava/lang/reflect/Method; targetClass Ljava/lang/Class<*>; Ljava/lang/Class; 'Ljava/util/HashSet; Ljava/util/HashSet; Ljava/util/regex/Matcher; getProperty 8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; get ? (II)Ljava/lang/String; ? ?
n ? java/util/Locale ? ENGLISH Ljava/util/Locale; ? ? ? ? toUpperCase &(Ljava/util/Locale;)Ljava/lang/String; ? ?
n ? invoke 9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; ? ?
[ ? is ? capitalized e2 Ljava/lang/Exception; e propName copyProperties .(Ljava/util/Properties;)Ljava/util/Properties;
8 lambda$copyProperties$1 =(Ljava/util/Properties;Ljava/lang/Object;Ljava/lang/Object;)V ? ?
? ? 7(Ljava/util/Properties;)Ljava/util/function/BiConsumer; 3 ? ? props copy setProperty I(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V e(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;Ljava/util/List;)V java/lang/InstantiationException ? java/lang/ClassNotFoundException ? org/slf4j/LoggerFactory ? getLogger %(Ljava/lang/Class;)Lorg/slf4j/Logger; ? ?
? ? java/util/List ? stream ()Ljava/util/stream/Stream; ? ? ? ? ? lambda$setProperty$2 /(Ljava/lang/String;Ljava/lang/reflect/Method;)Z ? ?
? ? (Ljava/lang/reflect/Method;)Z ? test 2(Ljava/lang/String;)Ljava/util/function/Predicate; ? ? ? java/util/stream/Stream ? filter 9(Ljava/util/function/Predicate;)Ljava/util/stream/Stream; ? ? ? ? findFirst ()Ljava/util/Optional; ? ? ? ? java/util/Optional ? orElse &(Ljava/lang/Object;)Ljava/lang/Object; ? ?
? ? lambda$setProperty$3 ? ?
? ? ? org/slf4j/Logger 'Property {} does not exist on target {} error 9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V java/lang/RuntimeException
'Property %s does not exist on target %s format 9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
n (Ljava/lang/String;)V
java/lang/Integer TYPE ?
} parseInt (Ljava/lang/String;)I
valueOf (I)Ljava/lang/Integer;
! java/lang/Long# $ parseLong (Ljava/lang/String;)J&'
$( (J)Ljava/lang/Long;*
$+ java/lang/Short- .
parseShort (Ljava/lang/String;)S01
.2 (S)Ljava/lang/Short;4
.5 java/lang/Boolean7 8 parseBoolean (Ljava/lang/String;)Z:;
8< (Z)Ljava/lang/Boolean;>
8? $Try to create a new instance of "{}"A debug '(Ljava/lang/String;Ljava/lang/Object;)VCDE forName %(Ljava/lang/String;)Ljava/lang/Class;GH
I getDeclaredConstructor 3([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;KL
M java/lang/reflect/ConstructorO newInstance '([Ljava/lang/Object;)Ljava/lang/Object;QR
PS &java/lang/ReflectiveOperationExceptionU FClass "{}" not found or could not instantiate it (Default constructor)W &Failed to set property {} on target {}Y ((Ljava/lang/String;[Ljava/lang/Object;)V[\ (Ljava/lang/Throwable;)V
^
_ methodName2 (Ljava/lang/ReflectiveOperationException;
paramClass propValue logger Lorg/slf4j/Logger;
methodName writeMethod equalsi ?
nj getParameterCount ()Ilm
[n m 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; ?q
8r key value com/zaxxer/hikari/HikariConfigv dataSource.x
startsWithz;
n{ length}m
n~ addDataSourceProperty?D
w? ? ?
? (get|is)[A-Z].+? compile -(Ljava/lang/String;)Ljava/util/regex/Pattern;??
Q? Code LineNumberTable LocalVariableTable
StackMapTable LocalVariableTypeTable Signature InnerClasses
SourceFile BootstrapMethods 1
? 3 *? ? ?
+ -? ? ? *? +? ?*? ? ? $M+*,? 6 ?