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 Classes
    Modifier and Type
    Class
    Description
    private static class 
    A completion runner for AspectJ.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static final void
    addAll(File file, List<String> args)
    Adds all Java and AJ files to args.
    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 void
    handleMessages(org.aspectj.bridge.MessageHandler handler)
    Handles AspectJ messages.
    private static String
    Prepares the AspectJ classpath.

    Methods inherited from class net.ssehub.easy.instantiation.core.model.defaultInstantiators.AbstractFileInstantiator

    determineTargetPath, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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.VilException
      Compiles a source path to a target path.
      Parameters:
      source - the source path
      target - the target path
      other - 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.VilException
      Compiles a source path to a target path.
      Parameters:
      source - the source artifacts
      target - the target path
      other - 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.VilException
      Compiles a source path to a target path.
      Parameters:
      source - the source artifacts
      sourceRoot - optional source root to search Java and AspectJ files within, may be null, supersedes source if given
      target - the target path
      other - 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

      private static final void addAll(File file, List<String> args)
      Adds all Java and AJ files to args.
      Parameters:
      file - the file or folder to start from
      args - 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