Class AspectJ
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
-
- net.ssehub.easy.instantiation.aspectj.instantiators.AspectJ
-
- All Implemented Interfaces:
IVilType
public class AspectJ extends AbstractFileInstantiator
Compiles java files using the AspectJ compiler.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classAspectJ.CompletionRunnerA completion runner for AspectJ.
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringCLASSPATH_ARG_NAME
-
Constructor Summary
Constructors Constructor Description AspectJ()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidaddAll(java.io.File file, java.util.List<java.lang.String> args)Adds all Java and AJ files toargs.static Set<FileArtifact>aspectJ(Path source, Path target, java.util.Map<java.lang.String,java.lang.Object> other)Compiles a source path to a target path.private static Set<FileArtifact>aspectJ(Collection<FileArtifact> source, java.io.File sourceRoot, Path target, java.util.Map<java.lang.String,java.lang.Object> other)Compiles a source path to a target path.static Set<FileArtifact>aspectJ(Collection<FileArtifact> source, Path target, java.util.Map<java.lang.String,java.lang.Object> other)Compiles a source path to a target path.private static voidhandleMessages(org.aspectj.bridge.MessageHandler handler)Handles AspectJ messages.private static java.lang.StringprepareAspectJClasspath(java.lang.String classpath)Prepares the AspectJ classpath.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator
determineTargetPath, toString
-
-
-
-
Field Detail
-
CLASSPATH_ARG_NAME
private static final java.lang.String CLASSPATH_ARG_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
aspectJ
public static Set<FileArtifact> aspectJ(Path source, Path target, java.util.Map<java.lang.String,java.lang.Object> other) throws VilException
Compiles 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:
VilException- in case that artifact creation fails
-
aspectJ
public static Set<FileArtifact> aspectJ(Collection<FileArtifact> source, Path target, java.util.Map<java.lang.String,java.lang.Object> other) throws VilException
Compiles 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:
VilException- in case that artifact creation fails
-
aspectJ
private static Set<FileArtifact> aspectJ(Collection<FileArtifact> source, java.io.File sourceRoot, Path target, java.util.Map<java.lang.String,java.lang.Object> other) throws VilException
Compiles 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:
VilException- in case that artifact creation fails
-
handleMessages
private static void handleMessages(org.aspectj.bridge.MessageHandler handler) throws VilExceptionHandles AspectJ messages.- Parameters:
handler- the message handler- Throws:
VilException- in case that abort of processing is needed
-
addAll
private static final void addAll(java.io.File file, java.util.List<java.lang.String> args)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 java.lang.String prepareAspectJClasspath(java.lang.String classpath) throws VilExceptionPrepares the AspectJ classpath.- Parameters:
classpath- the actual classpath as specified (may be empty)- Returns:
- the classpath to use
- Throws:
VilException- are required resources such as aspectj.rt available
-
-