make/jdk/src/classes/build/tools/taglet/ExtLink.java
changeset 49073 4f96cf952e71
parent 47216 71c04702a3d5
child 50782 e92d48cf94f9
equal deleted inserted replaced
49072:ed9ff662b1e0 49073:4f96cf952e71
     1 /*
     1 /*
     2  * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    47  * {@code Please see {@extLink Borealis a spectacular} sight.}
    47  * {@code Please see {@extLink Borealis a spectacular} sight.}
    48  * <p>
    48  * <p>
    49  * will produce the following html
    49  * will produce the following html
    50  * <p>
    50  * <p>
    51  * {@code
    51  * {@code
    52  * Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase9&id=Borealis">a spectacular</a> sight.
    52  * Please see <a href="https://www.oracle.com/pls/topic/lookup?ctx=javase10&id=Borealis">a spectacular</a> sight.
    53  * }
    53  * }
    54  */
    54  */
    55 public class ExtLink implements Taglet {
    55 public class ExtLink implements Taglet {
    56 
    56 
    57     static final String TAG_NAME = "extLink";
    57     static final String TAG_NAME = "extLink";
    58 
    58 
    59     static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase9&amp;id=";
    59     static final String URL = "https://www.oracle.com/pls/topic/lookup?ctx=javase10&amp;id=";
    60 
    60 
    61     static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");
    61     static final Pattern TAG_PATTERN = Pattern.compile("(?s)(\\s*)(?<name>\\w+)(\\s+)(?<desc>.*)$");
    62 
    62 
    63     /**
    63     /**
    64      * Returns the set of locations in which the tag may be used.
    64      * Returns the set of locations in which the tag may be used.