//# 0 errors, 36 messages
//#
package net.sourceforge.pebble.util;
    //#httpsurlrewriter.java:1:1: class: net.sourceforge.pebble.util.HttpsURLRewriter
    //#httpsurlrewriter.java:1:1: method: net.sourceforge.pebble.util.HttpsURLRewriter.net.sourceforge.pebble.util.HttpsURLRewriter__static_init

/**
 * Rewrite Urls to use the given scheme, typically https.
 * @author Olaf Kock
 */

public class HttpsURLRewriter extends UrlRewriter {

	private final String currentScheme;

	public HttpsURLRewriter(String currentScheme) {
    //#httpsurlrewriter.java:12: method: void net.sourceforge.pebble.util.HttpsURLRewriter.net.sourceforge.pebble.util.HttpsURLRewriter(String)
    //#input(void net.sourceforge.pebble.util.HttpsURLRewriter(String)): currentScheme
    //#input(void net.sourceforge.pebble.util.HttpsURLRewriter(String)): this
    //#output(void net.sourceforge.pebble.util.HttpsURLRewriter(String)): this.currentScheme
    //#post(void net.sourceforge.pebble.util.HttpsURLRewriter(String)): this.currentScheme == currentScheme
    //#post(void net.sourceforge.pebble.util.HttpsURLRewriter(String)): init'ed(this.currentScheme)
		this.currentScheme = currentScheme;
	}
    //#httpsurlrewriter.java:14: end of method: void net.sourceforge.pebble.util.HttpsURLRewriter.net.sourceforge.pebble.util.HttpsURLRewriter(String)
	
	public String rewrite(String url) {
		return Utilities.calcBaseUrl(currentScheme, url);
    //#httpsurlrewriter.java:17: method: String net.sourceforge.pebble.util.HttpsURLRewriter.rewrite(String)
    //#input(String rewrite(String)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).__Tag
    //#input(String rewrite(String)): net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.__Descendant_Table[net/sourceforge/pebble/PebbleContext]
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.__Dispatch_Table.getConfiguration()Lnet/sourceforge/pebble/Configuration;
    //#input(String rewrite(String)): net/sourceforge/pebble/PebbleContext.instance
    //#input(String rewrite(String)): this
    //#input(String rewrite(String)): this.currentScheme
    //#input(String rewrite(String)): url
    //#output(String rewrite(String)): return_value
    //#pre[1] (String rewrite(String)): (soft) net.sourceforge.pebble.PebbleContext__static_init.new PebbleContext(PebbleContext__static_init#1).configuration != null
    //#pre[4] (String rewrite(String)): (soft) url != null
    //#post(String rewrite(String)): return_value != null
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:startsWith
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:equals
    //#unanalyzed(String rewrite(String)): Effects-of-calling:net.sourceforge.pebble.Configuration:getSecureUrl
    //#unanalyzed(String rewrite(String)): Effects-of-calling:net.sourceforge.pebble.Configuration:getUrl
    //#unanalyzed(String rewrite(String)): Effects-of-calling:java.lang.String:replace
    //#httpsurlrewriter.java:17: end of method: String net.sourceforge.pebble.util.HttpsURLRewriter.rewrite(String)
	}

}
    //#output(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): __Descendant_Table[net/sourceforge/pebble/util/HttpsURLRewriter]
    //#output(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): __Dispatch_Table.rewrite(Ljava/lang/String;)Ljava/lang/String;
    //#output(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[net/sourceforge/pebble/util/HttpsURLRewriter]
    //#post(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): __Descendant_Table[net/sourceforge/pebble/util/HttpsURLRewriter] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): net/sourceforge/pebble/util/UrlRewriter.__Descendant_Table[net/sourceforge/pebble/util/HttpsURLRewriter] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.util.HttpsURLRewriter__static_init): __Dispatch_Table.rewrite(Ljava/lang/String;)Ljava/lang/String; == &rewrite
    //#httpsurlrewriter.java:: end of method: net.sourceforge.pebble.util.HttpsURLRewriter.net.sourceforge.pebble.util.HttpsURLRewriter__static_init
    //#httpsurlrewriter.java:: end of class: net.sourceforge.pebble.util.HttpsURLRewriter
