public final class ArtifactAstUtils extends Object
ArtifactAst| Modifier and Type | Method and Description |
|---|---|
static org.mule.runtime.ast.api.ArtifactAst |
parseAndBuildAppExtensionModel(String[] configResources,
AstXmlParserSupplier parserSupplier,
Set<org.mule.runtime.api.meta.model.ExtensionModel> extensions,
org.mule.runtime.ast.api.ArtifactType artifactType,
boolean disableValidations,
org.mule.runtime.core.api.MuleContext muleContext,
org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService)
Parses
configResources for a Mule application and returns an ArtifactAst enriched with an additional
ExtensionModel which models the app itself, with all its defined operations, sources, functions, etc. |
static Optional<org.mule.runtime.api.meta.model.ExtensionModel> |
parseArtifactExtensionModel(org.mule.runtime.ast.api.ArtifactAst ast,
ClassLoader artifactClassLoader,
org.mule.runtime.core.api.MuleContext muleContext,
org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService)
If the
ast represents an application which defines reusable components (operations, sources, etc), it returns an
ExtensionModel which represents it. |
public static org.mule.runtime.ast.api.ArtifactAst parseAndBuildAppExtensionModel(String[] configResources, AstXmlParserSupplier parserSupplier, Set<org.mule.runtime.api.meta.model.ExtensionModel> extensions, org.mule.runtime.ast.api.ArtifactType artifactType, boolean disableValidations, org.mule.runtime.core.api.MuleContext muleContext, org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService) throws org.mule.runtime.core.api.config.ConfigurationException
configResources for a Mule application and returns an ArtifactAst enriched with an additional
ExtensionModel which models the app itself, with all its defined operations, sources, functions, etc.
This extra ExtensionModel is accessible through the ArtifactAst.dependencies() set its named after the
muleContext.getConfiguration.getId() return value
configResources - the paths to the application's config filesparserSupplier - the supplier used to obtain the ast parser. It might be invoked several times during
the parsingextensions - the initial set of extensions the app depends on.artifactType - the artifact typedisableValidations - whether to disable DSL validationmuleContext - the app's MuleContextexpressionLanguageMetadataService - the ExpressionLanguageMetadataService used to resolve types.ArtifactAstorg.mule.runtime.core.api.config.ConfigurationException - it the app couldn't be parsedpublic static Optional<org.mule.runtime.api.meta.model.ExtensionModel> parseArtifactExtensionModel(org.mule.runtime.ast.api.ArtifactAst ast, ClassLoader artifactClassLoader, org.mule.runtime.core.api.MuleContext muleContext, org.mule.runtime.api.metadata.ExpressionLanguageMetadataService expressionLanguageMetadataService) throws org.mule.runtime.core.api.config.ConfigurationException
ast represents an application which defines reusable components (operations, sources, etc), it returns an
ExtensionModel which represents it.ast - the application's ASTartifactClassLoader - the application's classloadermuleContext - the application's contextexpressionLanguageMetadataService - the ExpressionLanguageMetadataService used to resolve types.ExtensionModelorg.mule.runtime.core.api.config.ConfigurationExceptionCopyright © 2003–2022 MuleSoft, Inc.. All rights reserved.