Examples of URLPattern


Examples of com.dianping.cat.configuration.url.pattern.entity.UrlPattern

      }
    } catch (Exception e) {
      Cat.logError(e);
    }
    if (m_UrlPattern == null) {
      m_UrlPattern = new UrlPattern();
    }
    m_handler.register(queryUrlPatternRules());
    Threads.forGroup("cat").start(new ConfigReloadTask());
  }
View Full Code Here

Examples of com.dianping.cat.configuration.url.pattern.entity.UrlPattern

    long modifyTime = config.getModifyDate().getTime();

    synchronized (this) {
      if (modifyTime > m_modifyTime) {
        String content = config.getContent();
        UrlPattern pattern = DefaultSaxParser.parse(content);

        m_UrlPattern = pattern;
        m_handler.register(new ArrayList<PatternItem>(m_UrlPattern.getPatternItems().values()));
        m_modifyTime = modifyTime;
      }
View Full Code Here

Examples of configuration.objects.URLPattern

     * @param e the root pattern element
     * @return a Pattern object
     */
    private URLPattern getPattern(Element e)
    {
        URLPattern pattern = new URLPattern();

        //Assume that the pattern is active by default
        pattern.active = true;

        //check if the pattern is active
View Full Code Here

Examples of configuration.objects.URLPattern

        try
        {
            for (; !found && i < patterns.size(); ++i)
            {
                URLPattern pattern = patterns.get(i);

                // The pattern is not active, skip it
                if (!pattern.active)
                {
                    continue;
View Full Code Here

Examples of dk.brics.jwig.URLPattern

        sb.append("}\n");
        return sb.toString();
    }

    private String getURLPattern(SootClass cl) {
        URLPattern up = JwigResolver.get().getJavaClass(cl)
                .getAnnotation(URLPattern.class);
        if (up == null)
            return "";
        return "[" + up.value() + "]";
    }
View Full Code Here

Examples of dk.brics.jwig.URLPattern

    private String getURLPattern(SootMethod method) {
        if (!method.isPublic() || method.isStatic())
            return "";
        Method m = JwigResolver.get().getJavaMethod(method);
        URLPattern up = m.getAnnotation(URLPattern.class);
        if (up == null)
            return "";
        return "[" + up.value() + "]";
    }
View Full Code Here

Examples of dk.brics.jwig.URLPattern

        }
        return false;
    }

    private boolean hasURLPatternAnnotation(Method method) {
        URLPattern annotation = method.getAnnotation(URLPattern.class);
        return annotation != null;
    }
View Full Code Here

Examples of dk.brics.jwig.URLPattern

    // added by esbena
    public static int getPriority(Method method) {
        Priority priorityAnnotation = method.getAnnotation(Priority.class);
        final int priority;
        if (priorityAnnotation == null) {
            URLPattern patternAnnotation = method
                    .getAnnotation(URLPattern.class);
            final String pattern;
            if (patternAnnotation != null)
                pattern = patternAnnotation.value();
            else
                pattern = method.getName();
            priority = MyPatternMatcher.computeDefaultPriority(pattern);
        } else
            priority = priorityAnnotation.value();
View Full Code Here

Examples of dk.brics.jwig.URLPattern

public class UnusedFilter extends AbstractFeedback {

    public UnusedFilter(SootMethod method) {
        Method javaMethod = JwigResolver.get().getJavaMethod(method);
        // will always exist as the method is a filter!
        URLPattern annotation = javaMethod.getAnnotation(URLPattern.class);
        String pattern = annotation.value();
        this.message = "The filter defined by: " + method.getSignature()
                + " (with the URLPattern: '" + pattern + "') is unused";
    }
View Full Code Here

Examples of dk.brics.jwig.URLPattern

     *            as the class to analyze
     * @return the set of webapp parameter names for this class.
     */
    private Set<String> getWebAppParams(SootClass classs) {
        Class<?> webapp = resolver.getJavaClass(classs);
        URLPattern pattern = webapp.getAnnotation(URLPattern.class);
        if (pattern != null)
            return new HashSet<String>(new MyPatternMatcher(pattern.value(),
                    false).getParameters());
        return new HashSet<String>();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.