1.1 --- a/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java Mon Sep 27 14:05:33 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java Mon Sep 27 14:20:39 2010 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -42,50 +42,17 @@ 1.11 */ 1.12 public class DocCommentScanner extends Scanner { 1.13 1.14 - /** A factory for creating scanners. */ 1.15 - public static class Factory extends Scanner.Factory { 1.16 - 1.17 - public static void preRegister(final Context context) { 1.18 - context.put(scannerFactoryKey, new Context.Factory<Scanner.Factory>() { 1.19 - public Factory make() { 1.20 - return new Factory(context); 1.21 - } 1.22 - }); 1.23 - } 1.24 - 1.25 - /** Create a new scanner factory. */ 1.26 - protected Factory(Context context) { 1.27 - super(context); 1.28 - } 1.29 - 1.30 - @Override 1.31 - public Scanner newScanner(CharSequence input) { 1.32 - if (input instanceof CharBuffer) { 1.33 - return new DocCommentScanner(this, (CharBuffer)input); 1.34 - } else { 1.35 - char[] array = input.toString().toCharArray(); 1.36 - return newScanner(array, array.length); 1.37 - } 1.38 - } 1.39 - 1.40 - @Override 1.41 - public Scanner newScanner(char[] input, int inputLength) { 1.42 - return new DocCommentScanner(this, input, inputLength); 1.43 - } 1.44 - } 1.45 - 1.46 - 1.47 /** Create a scanner from the input buffer. buffer must implement 1.48 * array() and compact(), and remaining() must be less than limit(). 1.49 */ 1.50 - protected DocCommentScanner(Factory fac, CharBuffer buffer) { 1.51 + protected DocCommentScanner(ScannerFactory fac, CharBuffer buffer) { 1.52 super(fac, buffer); 1.53 } 1.54 1.55 /** Create a scanner from the input array. The array must have at 1.56 * least a single character of extra space. 1.57 */ 1.58 - protected DocCommentScanner(Factory fac, char[] input, int inputLength) { 1.59 + protected DocCommentScanner(ScannerFactory fac, char[] input, int inputLength) { 1.60 super(fac, input, inputLength); 1.61 } 1.62