org.apache.cayenne.gen.internal.Utils.class Maven / Gradle / Ivy
The newest version!
???? 7 ?
java/lang/Object ()V
java/nio/file/Path toAbsolutePath ()Ljava/nio/file/Path; toString ()Ljava/lang/String;
%org/apache/cayenne/gen/internal/Utils getMavenSrcPathForPath ((Ljava/lang/String;)Ljava/util/Optional; test
checkDefaultMavenResourceDir 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
! " java/util/Optional of ((Ljava/lang/Object;)Ljava/util/Optional; $ main
& ' ( empty ()Ljava/util/Optional;
* + , - . org/apache/cayenne/map/DataMap getConfigurationSource (()Lorg/apache/cayenne/resource/Resource; 0 *org/apache/cayenne/CayenneRuntimeException 2 .Unable to create path from the unsaved DataMap
/ 4 5 ((Ljava/lang/String;[Ljava/lang/Object;)V 7 8 9 : ; $org/apache/cayenne/resource/Resource getURL ()Ljava/net/URL;
= > ? @ A java/net/URL toURI ()Ljava/net/URI; C ! D $(Ljava/net/URI;)Ljava/nio/file/Path; F java/net/URISyntaxException H 6Unable to create path from the DataMap source location
/ J K =(Ljava/lang/String;Ljava/lang/Throwable;[Ljava/lang/Object;)V M java/nio/file/LinkOption
O P Q R S java/nio/file/Files
isRegularFile 2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z U V getParent X java/lang/String Z src \ resources
^ _ `
buildFilePath '([Ljava/lang/String;)Ljava/lang/String;
W b c d indexOf (Ljava/lang/String;)I
W f g h substring (II)Ljava/lang/String; j java l m makeConcatWithConstants o p q r s java/io/File separator Ljava/lang/String;
W u v w join E(Ljava/lang/CharSequence;[Ljava/lang/CharSequence;)Ljava/lang/String; Code LineNumberTable LocalVariableTable this 'Lorg/apache/cayenne/gen/internal/Utils; *(Ljava/nio/file/Path;)Ljava/util/Optional; path Ljava/nio/file/Path; Signature >(Ljava/nio/file/Path;)Ljava/util/Optional; testDirPath mainDirPath
StackMapTable <(Ljava/lang/String;)Ljava/util/Optional; getRootPathForDataMap 6(Lorg/apache/cayenne/map/DataMap;)Ljava/nio/file/Path; resourcePath e Ljava/net/URISyntaxException; dataMap Lorg/apache/cayenne/map/DataMap; dirType idx I pathElements [Ljava/lang/String;
SourceFile
Utils.java BootstrapMethods ? ?
? ? ? m ? $java/lang/invoke/StringConcatFactory ?(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite; InnerClasses ? %java/lang/invoke/MethodHandles$Lookup ? java/lang/invoke/MethodHandles Lookup ! x / *? ? y $ z { | } x 9 *? ?
? ? y ' z ~ ? ? x ? $*? L+? +? ?*#? M,? ,? ?? %? y 0 1 2 6 7 8 ; z $ ~ s ? s
? s ? ? W? W ? ? ? ? x ? L*? )? ? /Y1? ? 3?*? )? 6 ?