Class AspectJ
java.lang.Object
net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
net.ssehub.easy.instantiation.aspectj.instantiators.AspectJ
- All Implemented Interfaces:
net.ssehub.easy.instantiation.core.model.vilTypes.IVilType
public class AspectJ
extends net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
Compiles java files using the AspectJ compiler.
- Author:
- Holger Eichelberger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classA completion runner for AspectJ. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static final voidAdds all Java and AJ files toargs.static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.artifactModel.Path source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) Compiles a source path to a target path.private static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source, File sourceRoot, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) Compiles a source path to a target path.static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) Compiles a source path to a target path.private static voidhandleMessages(org.aspectj.bridge.MessageHandler handler) Handles AspectJ messages.private static StringprepareAspectJClasspath(String classpath) Prepares the AspectJ classpath.Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
Field Details
-
CLASSPATH_ARG_NAME
- See Also:
-
-
Constructor Details
-
AspectJ
public AspectJ()
-
-
Method Details
-
aspectJ
public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.artifactModel.Path source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) throws net.ssehub.easy.instantiation.core.model.common.VilExceptionCompiles a source path to a target path.- Parameters:
source- the source pathtarget- the target pathother- the other parameter for the Java compiler, without leading "-"- Returns:
- the created artifacts
- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that artifact creation fails
-
aspectJ
public static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) throws net.ssehub.easy.instantiation.core.model.common.VilExceptionCompiles a source path to a target path.- Parameters:
source- the source artifactstarget- the target pathother- the other parameter for the Java compiler, without leading "-"- Returns:
- the created artifacts
- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that artifact creation fails
-
aspectJ
private static net.ssehub.easy.instantiation.core.model.vilTypes.Set<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> aspectJ(net.ssehub.easy.instantiation.core.model.vilTypes.Collection<net.ssehub.easy.instantiation.core.model.artifactModel.FileArtifact> source, File sourceRoot, net.ssehub.easy.instantiation.core.model.artifactModel.Path target, Map<String, Object> other) throws net.ssehub.easy.instantiation.core.model.common.VilExceptionCompiles a source path to a target path.- Parameters:
source- the source artifactssourceRoot- optional source root to search Java and AspectJ files within, may be null, supersedessourceif giventarget- the target pathother- the other parameter for the Java compiler, without leading "-"- Returns:
- the created artifacts
- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that artifact creation fails
-
handleMessages
private static void handleMessages(org.aspectj.bridge.MessageHandler handler) throws net.ssehub.easy.instantiation.core.model.common.VilException Handles AspectJ messages.- Parameters:
handler- the message handler- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that abort of processing is needed
-
addAll
Adds all Java and AJ files toargs.- Parameters:
file- the file or folder to start fromargs- the arguments to be modified as a side effect
-
prepareAspectJClasspath
private static String prepareAspectJClasspath(String classpath) throws net.ssehub.easy.instantiation.core.model.common.VilException Prepares the AspectJ classpath.- Parameters:
classpath- the actual classpath as specified (may be empty)- Returns:
- the classpath to use
- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- are required resources such as aspectj.rt available
-