Java Aspectj Usage convertToFile(String path)

Here you can find the source of convertToFile(String path)

Description

convert To File

License

Open Source License

Declaration

private static String convertToFile(String path) 

Method Source Code

//package com.java2s;
/**/*from  www  .j  av  a 2  s. com*/
 * Copyright (c) 2014 by Software Engineering Lab. of Sungkyunkwan University. All Rights Reserved.
 * 
 * Permission to use, copy, modify, and distribute this software and its documentation for
 * educational, research, and not-for-profit purposes, without fee and without a signed licensing agreement,
 * is hereby granted, provided that the above copyright notice appears in all copies, modifications, and distributions.
 */

public class Main {
    private static String TARGET_PRODUCT_NAME = "ZXing";

    private static String convertToFile(String path) {
        String fixedFile = path;
        if (TARGET_PRODUCT_NAME.equals("ZXing")) {
            String splitter = "/src/";
            fixedFile = path.substring(path.indexOf(splitter)
                    + splitter.length());
            fixedFile = fixedFile.replace('/', '.');
        } else if (TARGET_PRODUCT_NAME.equals("SWT")) {
            String splitter = "/org/eclipse/";
            fixedFile = path.substring(path.indexOf(splitter) + 1);
            fixedFile = fixedFile.replace('/', '.');
        } else if (TARGET_PRODUCT_NAME.equals("AspectJ")) {
            fixedFile = "org.aspectj/modules/" + fixedFile;
        }

        return fixedFile;
    }
}

Related

  1. accessToString(int access_flags, boolean for_class)
  2. arrayAsList(Object[] ra)
  3. classOrInterface(int access_flags)
  4. collectArguments(JoinPoint jp)
  5. combine(String[] one, String[] two)
  6. copyInstruction(Instruction i)
  7. createConstant(InstructionFactory fact, int value)
  8. createInstanceof(InstructionFactory fact, ReferenceType t)
  9. genPointcutDetails(Pointcut pcd)