635 /** |
635 /** |
636 * Return the MethodDoc for a MethodSymbol. |
636 * Return the MethodDoc for a MethodSymbol. |
637 * Should be called only on symbols representing methods. |
637 * Should be called only on symbols representing methods. |
638 */ |
638 */ |
639 public MethodDocImpl getMethodDoc(MethodSymbol meth) { |
639 public MethodDocImpl getMethodDoc(MethodSymbol meth) { |
|
640 assert !meth.isConstructor() : "not expecting a constructor symbol"; |
640 MethodDocImpl result = (MethodDocImpl)methodMap.get(meth); |
641 MethodDocImpl result = (MethodDocImpl)methodMap.get(meth); |
641 if (result != null) return result; |
642 if (result != null) return result; |
642 result = new MethodDocImpl(this, meth); |
643 result = new MethodDocImpl(this, meth); |
643 methodMap.put(meth, result); |
644 methodMap.put(meth, result); |
644 return result; |
645 return result; |
663 /** |
664 /** |
664 * Return the ConstructorDoc for a MethodSymbol. |
665 * Return the ConstructorDoc for a MethodSymbol. |
665 * Should be called only on symbols representing constructors. |
666 * Should be called only on symbols representing constructors. |
666 */ |
667 */ |
667 public ConstructorDocImpl getConstructorDoc(MethodSymbol meth) { |
668 public ConstructorDocImpl getConstructorDoc(MethodSymbol meth) { |
|
669 assert meth.isConstructor() : "expecting a constructor symbol"; |
668 ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); |
670 ConstructorDocImpl result = (ConstructorDocImpl)methodMap.get(meth); |
669 if (result != null) return result; |
671 if (result != null) return result; |
670 result = new ConstructorDocImpl(this, meth); |
672 result = new ConstructorDocImpl(this, meth); |
671 methodMap.put(meth, result); |
673 methodMap.put(meth, result); |
672 return result; |
674 return result; |