Package org.codehaus.aspectwerkz.transform.inlining.compiler

Examples of org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo$Model


     * this.setModel(model); </code>
     *
     *
     */
    public Model createAndSetModel() {
        Model newValue = new Model();
        this.setModel(newValue);
        return newValue;
    }
View Full Code Here


  public boolean acceptFeature(Feature feature) {
    return this.styleFilter.match(feature);
  }

  public Model getKmlModel(Feature feature, Point point) {
    Model kmlModel = KmlFactory.createModel()
        .withId(feature.getName().toString())
        .withAltitudeMode(getAltitudeMode(feature, point));
    kmlModel.createAndSetLocation().withLongitude(point.getCoordinate().x)
        .withLatitude(point.getCoordinate().y)
        .withAltitude(getAltitude(feature, point));
    kmlModel.createAndSetOrientation()
        .withHeading(
            getGenericRotationValue(feature, model.getHeading()))
        .withTilt(getGenericRotationValue(feature, model.getTilt()))
        .withRoll(getGenericRotationValue(feature, model.getRoll()));
    kmlModel.createAndSetLink()
        .withHref(
            styleFilter.getExpressionValue(model.getHref(), feature))
        .withRefreshMode(RefreshMode.ON_CHANGE);
    return kmlModel;
  }
View Full Code Here

  public Kml getKml() {
    return kml;
  }

  private void addPoint(Feature feature, Point point, List<KmlModel> kmlModels) {
    Model kmlModel = getKmlModel(feature, point, kmlModels);
    if (kmlModel != null) {
      Placemark placemark = new Placemark().withName(feature.getName()
          .toString());
      placemark.createAndSetLookAt()
          .withLongitude(point.getCoordinate().x)
View Full Code Here

        final Class clazz = JoinPointFactory.compileJoinPointAndAttachToClassLoader(
                compilationModel, calleeClass.getClassLoader()
        );

        JoinPointFactory.addCompilationInfo(clazz, new CompilationInfo(compilationModel));
    }
View Full Code Here

        final ChangeSet changeSet = new ChangeSet();
        for (Iterator it = allMatchingJoinPoints.iterator(); it.hasNext();) {
            final MatchingJoinPointInfo joinPointInfo = (MatchingJoinPointInfo) it.next();

            final CompilationInfo compilationInfo = joinPointInfo.getCompilationInfo();
            compilationInfo.incrementRedefinitionCounter();

            changeSet.addElement(new ChangeSet.Element(compilationInfo, joinPointInfo));
        }

        doRedefine(changeSet);
View Full Code Here

     * Compiles a completely new join point instance based on the new redefined model.
     *
     * @param changeSetElement the change set item
     */
    private static void compileNewJoinPoint(final ChangeSet.Element changeSetElement) {
        final CompilationInfo compilationInfo = changeSetElement.getCompilationInfo();
        final MatchingJoinPointInfo joinPointInfo = changeSetElement.getJoinPointInfo();
        final ClassLoader loader = joinPointInfo.getJoinPointClass().getClassLoader();
        final AdviceInfoContainer newAdviceContainer = JoinPointManager.getAdviceInfoContainerForJoinPoint(
                joinPointInfo.getExpressionContext(),
                loader
        );
        final CompilationInfo.Model redefinedModel = new CompilationInfo.Model(
                compilationInfo.getInitialModel().getEmittedJoinPoint(), // copy the reference since it is the same
                newAdviceContainer,
                compilationInfo.getRedefinitionCounter(),
                compilationInfo.getInitialModel().getThisClassInfo()
        );
        JoinPointFactory.compileJoinPointAndAttachToClassLoader(redefinedModel, loader);

        compilationInfo.setRedefinedModel(redefinedModel);
        JoinPointFactory.addCompilationInfo(joinPointInfo.getJoinPointClass(), compilationInfo);
    }
View Full Code Here

        public CompiledJoinPoint(CompilationInfo.Model model) {

            bytecode = JoinPointFactory.compileJoinPoint(model);

            compilationInfo = new CompilationInfo(model);

        }
View Full Code Here

        final ChangeSet changeSet = new ChangeSet();
        for (Iterator it = allMatchingJoinPoints.iterator(); it.hasNext();) {
            final MatchingJoinPointInfo joinPointInfo = (MatchingJoinPointInfo) it.next();

            final CompilationInfo compilationInfo = joinPointInfo.getCompilationInfo();
            compilationInfo.incrementRedefinitionCounter();

            changeSet.addElement(new ChangeSet.Element(compilationInfo, joinPointInfo));
        }

        doRedefine(changeSet);
View Full Code Here

     * Compiles a completely new join point instance based on the new redefined model.
     *
     * @param changeSetElement the change set item
     */
    private static void compileNewJoinPoint(final ChangeSet.Element changeSetElement) {
        final CompilationInfo compilationInfo = changeSetElement.getCompilationInfo();
        final MatchingJoinPointInfo joinPointInfo = changeSetElement.getJoinPointInfo();
        final ClassLoader loader = joinPointInfo.getJoinPointClass().getClassLoader();
        final AdviceInfoContainer newAdviceContainer = JoinPointManager.getAdviceInfoContainerForJoinPoint(
                joinPointInfo.getExpressionContext(),
                loader
        );
        final CompilationInfo.Model redefinedModel = new CompilationInfo.Model(
                compilationInfo.getInitialModel().getEmittedJoinPoint(), // copy the reference since it is the same
                newAdviceContainer,
                compilationInfo.getRedefinitionCounter(),
                compilationInfo.getInitialModel().getThisClassInfo()
        );
        JoinPointFactory.compileJoinPointAndAttachToClassLoader(redefinedModel, loader);

        compilationInfo.setRedefinedModel(redefinedModel);
        JoinPointFactory.addCompilationInfo(joinPointInfo.getJoinPointClass(), compilationInfo);
    }
View Full Code Here

        public byte[] bytecode;
        public CompilationInfo compilationInfo;

        public CompiledJoinPoint(CompilationInfo.Model model) {
            bytecode = JoinPointFactory.compileJoinPoint(model);
            compilationInfo = new CompilationInfo(model);
        }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.transform.inlining.compiler.CompilationInfo$Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.