Class CompilerUtil
java.lang.Object
org.openprovenance.prov.template.compiler.CompilerUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.squareup.javapoet.ParameterizedTypeNamestatic final com.squareup.javapoet.ParameterizedTypeNamestatic final com.squareup.javapoet.TypeNamestatic final com.squareup.javapoet.ParameterizedTypeNamestatic final com.squareup.javapoet.TypeVariableNamestatic final ProvUtilities -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallQualifiedNames(Bundle bundle, Set<QualifiedName> result, ProvFactory pFactory) allQualifiedNames(Statement statement) allQualifiedNamesInAttributes(Statement statement, ProvFactory pf) beanNameClass(String templateName, BeanDirection beanDirection) beanNameClass(String templateName, BeanDirection beanDirection, String extension) capitalize(String str) commonNameClass(String templateName) createExamplar(com.fasterxml.jackson.databind.JsonNode the_var, String key, int num, ProvFactory pFactory) voidextractVariablesAndAttributes(Bundle bundle, Set<QualifiedName> allVars, Set<QualifiedName> allAtts, ProvFactory pFactory) generateArgumentsListForCall(com.fasterxml.jackson.databind.JsonNode the_var, Map<String, String> translator) com.squareup.javapoet.TypeSpec.BuildergenerateClassBuilder2(String name) com.squareup.javapoet.TypeSpec.BuildergenerateClassBuilder3(String name) com.squareup.javapoet.TypeSpec.BuildergenerateClassInit(String name) com.squareup.javapoet.TypeSpec.BuildergenerateClassInitExtends(String name, String packge, String supername) com.squareup.javapoet.MethodSpecvoidgenerateDocumentSpecializedParameters(com.squareup.javapoet.MethodSpec.Builder builder, Map<String, List<Descriptor>> theVar, Collection<String> variables) generateExampleForType(String declaredType, String localPart, ProvFactory pFactory) com.squareup.javapoet.TypeSpec.BuildergenerateInterfaceInit(String name) com.squareup.javapoet.TypeSpec.BuildergenerateInterfaceInitParameter(String name, com.squareup.javapoet.TypeVariableName type) com.squareup.javapoet.TypeSpec.BuildergenerateInterfaceInitParameter(String name, String type) voidgenerateSpecializedParameters(com.squareup.javapoet.MethodSpec.Builder builder, com.fasterxml.jackson.databind.JsonNode the_var) voidgenerateSpecializedParametersJavadoc(com.squareup.javapoet.MethodSpec.Builder builder, com.fasterxml.jackson.databind.JsonNode the_var, com.fasterxml.jackson.databind.JsonNode the_documentation, com.fasterxml.jackson.databind.JsonNode the_return) com.squareup.javapoet.TypeSpec.Buildercom.squareup.javapoet.TypeSpec.Buildercom.squareup.javapoet.TypeSpec.Buildercom.fasterxml.jackson.databind.JsonNodegetBindingsSchema(String bindings) getDeclaredType(com.fasterxml.jackson.databind.JsonNode the_var, String key) getDeclaredType(Map<String, List<Descriptor>> theVar, String key) Class<?> getJavaDocumentTypeForDeclaredType(Map<String, List<Descriptor>> theVar, String key) Class<?> getJavaTypeForDeclaredType(com.fasterxml.jackson.databind.JsonNode the_var, String key) Class<?> getJavaTypeForDeclaredType(Map<String, List<Descriptor>> varMap, String key) getResultSetMethodForClass(Class<?> cl) inputsNameClass(String templateName) inputsNameClass(String templateName, String extension) integratorBuilderNameClass(String templateName) integratorNameClass(String templateName) booleanisVariableDenotingQualifiedName(String key, com.fasterxml.jackson.databind.JsonNode the_var) booleanisVariableDenotingQualifiedName(String key, Map<String, List<Descriptor>> theVar) loggerName(String template) booleannoNode(com.fasterxml.jackson.databind.JsonNode jsonNode2) outputsNameClass(String templateName) processorNameClass(String templateName) pySpecWithComment(String templateName, StackTraceElement stackTraceElement) pySpecWithComment(TemplatesCompilerConfig configs, StackTraceElement stackTraceElement) readDocumentFromFile(String file) booleansaveToFile(String destinationDir, String destination, com.squareup.javapoet.JavaFile spec) booleansaveToFile(String destinationDir, String destination, Supplier<String> spec) voidspecWithComment(com.squareup.javapoet.MethodSpec.Builder mspec) com.squareup.javapoet.JavaFilespecWithComment(com.squareup.javapoet.TypeSpec typeSpec, String templateName, String packge, StackTraceElement stackTraceElement) com.squareup.javapoet.JavaFilespecWithComment(com.squareup.javapoet.TypeSpec typeSpec, TemplatesCompilerConfig configs, String packge, StackTraceElement stackTraceElement) templateNameClass(String templateName) voidwriteDocument(String file, Document doc)
-
Field Details
-
typeT
public static final com.squareup.javapoet.TypeVariableName typeT -
hashmapType
public static final com.squareup.javapoet.ParameterizedTypeName hashmapType -
builderMapType
public static final com.squareup.javapoet.ParameterizedTypeName builderMapType -
listOfArrays
public static final com.squareup.javapoet.TypeName listOfArrays -
u
-
mapIntArrayType
public static final com.squareup.javapoet.ParameterizedTypeName mapIntArrayType
-
-
Constructor Details
-
CompilerUtil
-
-
Method Details
-
generateNewNameForVariable
-
capitalize
-
templateNameClass
-
beanNameClass
-
beanNameClass
-
commonNameClass
-
outputsNameClass
-
inputsNameClass
-
inputsNameClass
-
processorNameClass
-
integratorBuilderNameClass
-
integratorNameClass
-
loggerName
-
sqlName
-
extractVariablesAndAttributes
public void extractVariablesAndAttributes(Bundle bundle, Set<QualifiedName> allVars, Set<QualifiedName> allAtts, ProvFactory pFactory) -
generateClassInit
-
generateClassInitExtends
-
generateInterfaceInit
-
generateInterfaceInitParameter
-
generateInterfaceInitParameter
public com.squareup.javapoet.TypeSpec.Builder generateInterfaceInitParameter(String name, com.squareup.javapoet.TypeVariableName type) -
generateClassBuilder3
-
generateClassBuilder2
-
generateTypeManagementClass
-
generateTypePropagateClass
-
generateTypedRecordClass
-
generateConstructor2
-
camelcase
-
allQualifiedNames
-
allQualifiedNamesInAttributes
-
allQualifiedNames
-
readDocumentFromFile
public Document readDocumentFromFile(String file) throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, FileNotFoundException -
writeDocument
public void writeDocument(String file, Document doc) throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
getInteropFramework
public Object getInteropFramework() throws ClassNotFoundException, NoSuchMethodException, SecurityException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException -
saveToFile
-
saveToFile
-
get_bindings_schema
public com.fasterxml.jackson.databind.JsonNode get_bindings_schema(SimpleTemplateCompilerConfig config) -
getBindingsSchema
-
getBindingsSchema
-
getJavaTypeForDeclaredType
-
getJavaTypeForDeclaredType
-
getJavaDocumentTypeForDeclaredType
-
generateSpecializedParameters
public void generateSpecializedParameters(com.squareup.javapoet.MethodSpec.Builder builder, com.fasterxml.jackson.databind.JsonNode the_var) -
generateDocumentSpecializedParameters
public void generateDocumentSpecializedParameters(com.squareup.javapoet.MethodSpec.Builder builder, Map<String, List<Descriptor>> theVar, Collection<String> variables) -
isVariableDenotingQualifiedName
public boolean isVariableDenotingQualifiedName(String key, com.fasterxml.jackson.databind.JsonNode the_var) -
isVariableDenotingQualifiedName
-
generateArgumentsListForCall
-
generateSpecializedParametersJavadoc
public void generateSpecializedParametersJavadoc(com.squareup.javapoet.MethodSpec.Builder builder, com.fasterxml.jackson.databind.JsonNode the_var, com.fasterxml.jackson.databind.JsonNode the_documentation, com.fasterxml.jackson.databind.JsonNode the_return) -
noNode
public boolean noNode(com.fasterxml.jackson.databind.JsonNode jsonNode2) -
generateExampleForType
-
createExamplar
public String createExamplar(com.fasterxml.jackson.databind.JsonNode the_var, String key, int num, ProvFactory pFactory) -
getDeclaredType
-
getDeclaredType
-
varPrefix
-
attPrefix
-
getConverterForDeclaredType2
-
getConverterForDeclaredType
-
getResultSetMethodForClass
-
specWithComment
public com.squareup.javapoet.JavaFile specWithComment(com.squareup.javapoet.TypeSpec typeSpec, String templateName, String packge, StackTraceElement stackTraceElement) -
specWithComment
public com.squareup.javapoet.JavaFile specWithComment(com.squareup.javapoet.TypeSpec typeSpec, TemplatesCompilerConfig configs, String packge, StackTraceElement stackTraceElement) -
pySpecWithComment
-
pySpecWithComment
public String pySpecWithComment(TemplatesCompilerConfig configs, StackTraceElement stackTraceElement) -
specWithComment
public void specWithComment(com.squareup.javapoet.MethodSpec.Builder mspec) -
thisMethodAndLine
-
previousMethodAndLine
-