All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.cayenne.gen.ClassGenerationAction.class Maven / Gradle / Ivy

The newest version!
????7?
java/lang/Object()V		
,org/apache/cayenne/gen/ClassGenerationActioncgenConfiguration*Lorg/apache/cayenne/gen/CgenConfiguration;
(org/apache/cayenne/gen/CgenConfigurationgetExternalToolConfig()Ljava/lang/String;org.apache.velocity.tools
java/lang/SystemgetProperty&(Ljava/lang/String;)Ljava/lang/String;%org/apache/velocity/tools/ToolManager
(ZZ)V
!"#$%3org/apache/velocity/tools/config/ConfigurationUtilsfindK(Ljava/lang/String;)Lorg/apache/velocity/tools/config/FactoryConfiguration;
'()getToolboxFactory,()Lorg/apache/velocity/tools/ToolboxFactory;
+,-./(org/apache/velocity/tools/ToolboxFactory	configure:(Lorg/apache/velocity/tools/config/FactoryConfiguration;)V
123
createContext)()Lorg/apache/velocity/tools/ToolContext;	567context%Lorg/apache/velocity/context/Context;9#org/apache/velocity/VelocityContext
8<java/util/HashMap
;>?(I)V	ABC
templateCacheLjava/util/Map;
EFGHI"org/apache/cayenne/gen/StringUtilsgetInstance&()Lorg/apache/cayenne/gen/StringUtils;KLMNorg/apache/cayenne/gen/ArtifactgetQualifiedClassName
EPQ
stripClass
ESTstripPackageNameKVWgetQualifiedBaseClassNameYZmakeConcatWithConstants
\]getSuperPkg
_`abcjava/lang/StringisEmpty()ZYf
baseClassNamehijkl#org/apache/velocity/context/Contextput8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;nbasePackageNamepsubClassNamersubPackageNametsuperClassNamevsuperPackageNamexobjectKz{|	getObject()Ljava/lang/Object;~stringUtils?createPropertyNames
??cisCreatePropertyNames
?????java/lang/BooleanvalueOf(Z)Ljava/lang/Boolean;?createPKProperties
??cisCreatePKProperties	???utilsFactory*Lorg/apache/cayenne/gen/ToolsUtilsFactory;?????(org/apache/cayenne/gen/ToolsUtilsFactorycreateImportUtils&()Lorg/apache/cayenne/gen/ImportUtils;?importUtils?
propertyUtils	???loggerLorg/slf4j/Logger;????createPropertyUtils^(Lorg/slf4j/Logger;Lorg/apache/cayenne/gen/ImportUtils;)Lorg/apache/cayenne/gen/PropertyUtils;?
metadataUtils	???&Lorg/apache/cayenne/gen/MetadataUtils;K???postInitContext((Lorg/apache/velocity/context/Context;)V?????java/util/Collectioniterator()Ljava/util/Iterator;????cjava/util/IteratorhasNext???|next? org/apache/cayenne/map/ObjEntity?%org/apache/cayenne/gen/EntityArtifact
???%(Lorg/apache/cayenne/map/ObjEntity;)V
???addArtifact$(Lorg/apache/cayenne/gen/Artifact;)V?!org/apache/cayenne/map/Embeddable?)org/apache/cayenne/gen/EmbeddableArtifact
???&(Lorg/apache/cayenne/map/Embeddable;)V
??getArtifactsGenerationMode	?????.org/apache/cayenne/gen/ArtifactsGenerationModeALL0Lorg/apache/cayenne/gen/ArtifactsGenerationMode;
???getLabel
_???equals(Ljava/lang/Object;)Z?&org/apache/cayenne/gen/DataMapArtifact
???
getDataMap"()Lorg/apache/cayenne/map/DataMap;
?????org/apache/cayenne/map/DataMapgetQueryDescriptors()Ljava/util/Collection;
???9(Lorg/apache/cayenne/map/DataMap;Ljava/util/Collection;)V
???getArtifacts????contains???clear
???getEntities()Ljava/util/Set;?????
java/util/Setstream()Ljava/util/stream/Stream;applyM(Lorg/apache/cayenne/gen/ClassGenerationAction;)Ljava/util/function/Function;	java/util/stream/Streammap8(Ljava/util/function/Function;)Ljava/util/stream/Stream;

java/util/stream/CollectorstoList()Ljava/util/stream/Collector;collect0(Ljava/util/stream/Collector;)Ljava/lang/Object;
addEntities(Ljava/util/Collection;)V
?getEmbeddables
addEmbeddables
 !"
addDataMap#(Lorg/apache/cayenne/map/DataMap;)V
$%validateAttributes
'(?execute*?+
java/util/Map
-.?resetContextForArtifact
01cisMakePairs	34567-org/apache/cayenne/gen/ArtifactGenerationModeGENERATION_GAP/Lorg/apache/cayenne/gen/ArtifactGenerationMode;	39:7SINGLE_CLASSK<=>getTemplateTypesW(Lorg/apache/cayenne/gen/ArtifactGenerationMode;)[Lorg/apache/cayenne/gen/TemplateType;
@AB
openWriter7(Lorg/apache/cayenne/gen/TemplateType;)Ljava/io/Writer;
DE?resetContextForArtifactTemplate
GHIgetTemplateE(Lorg/apache/cayenne/gen/TemplateType;)Lorg/apache/velocity/Template;
KLMNOorg/apache/velocity/Templatemerge8(Lorg/apache/velocity/context/Context;Ljava/io/Writer;)V
QRSTjava/io/WritercloseVjava/lang/Throwable
UXYZ
addSuppressed(Ljava/lang/Throwable;)V\java/util/Properties
[
_`ainitVelocityProperties>(Ljava/util/Properties;Lorg/apache/cayenne/gen/TemplateType;)Vc&org/apache/velocity/app/VelocityEngine
b
bfghinit(Ljava/util/Properties;)V
jklgetTemplateByTypeL(Lorg/apache/cayenne/gen/TemplateType;)Lorg/apache/cayenne/gen/CgenTemplate;
nopq#org/apache/cayenne/gen/CgenTemplategetName
bsHt2(Ljava/lang/String;)Lorg/apache/velocity/Template;
nvwcisFiley,org/apache/velocity/runtime/RuntimeConstants{resource.loaders}cayenne
[k?8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;?resource.loader.cayenne.class?3org/apache/cayenne/gen/ClassGeneratorResourceLoader
?o?java/lang/Class?resource.loader.cayenne.cache?false
???getRootPath()Ljava/nio/file/Path;?resource.loader.cayenne.root?string?resource.loader.string.class?@org/apache/velocity/runtime/resource/loader/StringResourceLoader?&resource.loader.string.repository.name?customTemplateRepo
???putTemplateTextInRepository((Lorg/apache/cayenne/gen/CgenTemplate;)V?Forg/apache/velocity/runtime/resource/util/StringResourceRepositoryImpl
?
n??getData?????Borg/apache/velocity/runtime/resource/util/StringResourceRepositoryputStringResource'(Ljava/lang/String;Ljava/lang/String;)V
????
setRepositoryY(Ljava/lang/String;Lorg/apache/velocity/runtime/resource/util/StringResourceRepository;)V
???buildOutputPath?*org/apache/cayenne/CayenneRuntimeException?Output directory is not set.
???((Ljava/lang/String;[Ljava/lang/Object;)V?java/nio/file/LinkOption
?????java/nio/file/Files	notExists2(Ljava/nio/file/Path;[Ljava/nio/file/LinkOption;)Z?%java/nio/file/attribute/FileAttribute
????createDirectoriesR(Ljava/nio/file/Path;[Ljava/nio/file/attribute/FileAttribute;)Ljava/nio/file/Path;?java/io/IOException?"Can't create output directory '%s'
????isDirectory?'%s' is not a directory.
????
isWritable(Ljava/nio/file/Path;)Z?1No write permission for the output directory '%s'
????c#org/apache/cayenne/gen/TemplateTypeisSuperclass
???fileForSuperclass()Ljava/io/File;
???fileForClass?
superclass?class
????java/io/FilegetCanonicalPath?Z?8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;?????org/slf4j/Loggerinfo(Ljava/lang/String;)V?java/io/FileOutputStream
???(Ljava/io/File;)V
??getEncoding?java/io/OutputStreamWriter
?+(Ljava/io/OutputStream;Ljava/lang/String;)V
?(Ljava/io/OutputStream;)Vhget&(Ljava/lang/String;)Ljava/lang/Object;
*

getOutputPattern
E!replaceWildcardInStringWithStringJ(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;?java/nio/file/PathtoFile
mkpath0(Ljava/io/File;Ljava/lang/String;)Ljava/io/File;
?#(Ljava/io/File;Ljava/lang/String;)V
? cexists
"#$getSuperTemplate'()Lorg/apache/cayenne/gen/CgenTemplate;
&'(fileNeedUpdate#(Ljava/io/File;Ljava/lang/String;)Z
*+cisOverwrite
-H$
/0cisForce
234isOld(Ljava/io/File;)Z
?6?
?89:lastModified()J
<=:getTimestamp
?@cisUsePkgPath	?BCD
separatorCharC
_FGHreplace(CC)Ljava/lang/String;
?J?c
?LMcmkdirsOjava/lang/Exception
_Q?R&(Ljava/lang/Object;)Ljava/lang/String;Y
N6
?VWX
getEmbeddable7(Ljava/lang/String;)Lorg/apache/cayenne/map/Embeddable;
?Z[\getObjEntity6(Ljava/lang/String;)Lorg/apache/cayenne/map/ObjEntity;SUPERCLASS_PREFIXLjava/lang/String;
ConstantValuea_WILDCARDCUSTOM_TEMPLATE_REPO	SignatureALjava/util/Map;-(Lorg/apache/cayenne/gen/CgenConfiguration;)VCodeLineNumberTableLocalVariableTableconfig7Lorg/apache/velocity/tools/config/FactoryConfiguration;manager'Lorg/apache/velocity/tools/ToolManager;this.Lorg/apache/cayenne/gen/ClassGenerationAction;
cgenConfigtoolConfigFile
StackMapTableartifact!Lorg/apache/cayenne/gen/Artifact;$Lorg/apache/cayenne/gen/StringUtils;qualifiedClassNamepackageName	classNamequalifiedBaseClassName$Lorg/apache/cayenne/gen/ImportUtils;entity"Lorg/apache/cayenne/map/ObjEntity;entitiesLjava/util/Collection;LocalVariableTypeTable:Ljava/util/Collection;=(Ljava/util/Collection;)V
embeddable#Lorg/apache/cayenne/map/Embeddable;embeddables;Ljava/util/Collection;>(Ljava/util/Collection;)VdataMap Lorg/apache/cayenne/map/DataMap;prepareArtifacts
ExceptionsoutLjava/io/Writer;type%Lorg/apache/cayenne/gen/TemplateType;artifactMode
templateTypes&[Lorg/apache/cayenne/gen/TemplateType;?propsLjava/util/Properties;velocityEngine(Lorg/apache/velocity/app/VelocityEngine;template%Lorg/apache/cayenne/gen/CgenTemplate;repoDLorg/apache/velocity/runtime/resource/util/StringResourceRepository;eLjava/io/IOException;dirLjava/nio/file/Path;labeltemplateTypeoutFileLjava/io/File;Ljava/io/FileOutputStream;filenamedesttemplateFiletemplateFileNamefilepkgNamepathfullPath	setLogger(Lorg/slf4j/Logger;)VgetCgenConfiguration,()Lorg/apache/cayenne/gen/CgenConfiguration;
setContextsetCgenConfigurationgetUtilsFactory,()Lorg/apache/cayenne/gen/ToolsUtilsFactory;setUtilsFactory-(Lorg/apache/cayenne/gen/ToolsUtilsFactory;)VsetMetadataUtils)(Lorg/apache/cayenne/gen/MetadataUtils;)VgetMetadataUtils(()Lorg/apache/cayenne/gen/MetadataUtils;lambda$prepareArtifacts$1lambda$prepareArtifacts$0
SourceFileClassGenerationAction.javaBootstrapMethods?_?.auto?&(Ljava/lang/Object;)Ljava/lang/Object;?
??\\?
??XX?Generating  file: ?Error making path: ?
???Z?$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;?
?????"java/lang/invoke/LambdaMetafactorymetafactory?(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;InnerClasses?%java/lang/invoke/MethodHandles$Lookup?java/lang/invoke/MethodHandlesLookup!	]^_`b^_	c^_???67BCde????fg?Z*?*+?+?
M??,?+?Y?N,?,? :-?&?**-?0?4?*?8Y?:?4*?;Y?=?@?h6
RS	TVW$X(Y.Z7\?]B^M`Yai4.	jk$lmZnoZpLq^r?_??

.?g??DM+?JN,-?O:,-?R:+?U:,?O:,?R:,-?R?X:	*??[:

?
?^??d:
*?4e?gW*?4m?gW*?4o?gW*?4q?gW*?4s	?gW*?4u
?gW*?4w+?y?gW*?4},?gW*?4*??????gW*?4?*??????gW?hZgijkm!n)o1q=sFtSu\xjyx{?|?~???????????ip?no?st?~u?v^?w^?x^!?y^)?n^1?f^=?t^	F?v^
r+?SKE________E?g?L*????M*?4?,?gW*?4?*??*??,???gW*?4?*???gW+*?4???h?
??1?A?K?i LnoLst
B?zg?1+?/+??M,???,????N*???Y-???ç?ޱh???-?0?i {|1no1}~1}?r???$d?g?1+?/+??M,???,????N*???Y-?˶ç?ޱh???-?0?i ??1no1?~1??r???$d?!"g?@*??βѶ׶ښ???Y*???+???M*???,???*?,?ñh???'?7???i @no@??'str	?*K?g?d*?????**?????*???
????**????*???
????**????h.???$?/?2?E?J?U?X?c?idno(g?E*?#*?????L+???+???KM*,?&???*?@?)?N*?@?)-??,8h&	??$?)?,?5?8?B?D?i$stEnor???KU?N(?g??*+?,*??/?	?2??8M+,?;N-:?66?Y2:*??:?*+?C*?F*?4?J?&?P?:	??P?:
	
?W	??????B[hUotwUh:?????!?:?B?G?L?[?h?????i>BA??:I???no?stq?7!i??rW	B3?K3???.?QLU?
K3???QUU???NHIg?+?[Y?]M*,+?^?bY?dN-,?e-*?+?i?m?r?h?????i*+no+??#????`ag?z*?,?iN-?u?C+z|?~W+?????~W+???~W*????>+?*????~W?,+z??~W+?????~W+???~W*-???h2?	???)?4?>?P[ityi*znoz??z??	q??r	?Pn(??gh??Y??M,+?m+?????,???h	
i no????%g
*???L+???Y?????+?????#+?¸?W?M??Y??Y+S???+???̚??Y??Y+S???+?њ??Y??Y+S????&/2?h6
&/23F Q!d$k%~'i 3??now??r?V?ABgr+?י
*?ܧ*??M,??*???'+?י	??N*??-,???????Y,??N*??????Y-*????????Y-??h"2347 819D=M?i41?^rnor??_??M%??rC???B_?$?GQ?N??g?k*?4u??_L*?4s??_M?D	*??,?N??Y**????+?-?:??**??!???%???hHIK0LKNfOhRi4kno\w^Mx^0;?^K ??r?h___??N??g!?*?4q??_L*?4o??_M?D	*??,?N??Y**????+?-?:??0*??/??*??)??**??,???%???h2[\^0_KaSc]d_hiikl~m?qi4?notw^ex^0S?^K8??r?____??N'(g?7*??.??*+?1?$,????Y,?5N-?7+?7?????h"z
{~??#?5?i*#??7no7??7?^r
??@?34gT+?7*??;????h?ino??r@g?J*??>?,?+?,.?A?EN??Y+-?:?I??K??NY?P?S?T??h????%?5?G?i4JnoJ??J?^0?^%%??r
?6_??N??g>*+???h
??ino????g/*??h?ino??g>*+?4?h
??ino67?fg>*+??h
??ino??g/*???h?ino??g>*+???h
??ino????g>*+???h
??ino????g/*???h?ino?Xg@*???+?U?h?ino?^?\g@*???+?Y?h?ino{^???.?????????????????
???




© 2015 - 2024 Weber Informatics LLC | Privacy Policy