提交 42da9239 编写于 作者: V vromero

8004814: javadoc should be able to detect default methods

Reviewed-by: jjg
Contributed-by: maurizio.cimadamore@oracle.com
上级 b38aa853
/*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -65,6 +65,12 @@ public interface ClassDoc extends ProgramElementDoc, Type {
*/
boolean isExternalizable();
/**
* Return true if this class can be used as a target type of a lambda expression
* or method reference.
*/
boolean isFunctionalInterface();
/**
* Return the serialization methods for this class or
* interface.
......
/*
* Copyright (c) 1998, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
......@@ -38,6 +38,11 @@ public interface MethodDoc extends ExecutableMemberDoc {
*/
boolean isAbstract();
/**
* Return true if this method is default
*/
boolean isDefault();
/**
* Get return type.
*
......
......@@ -276,6 +276,10 @@ public class ClassDocImpl extends ProgramElementDocImpl implements ClassDoc {
return false;
}
public boolean isFunctionalInterface() {
return env.types.isFunctionalInterface(tsym);
}
/**
* Return the package that this class is contained in.
*/
......
......@@ -75,6 +75,13 @@ public class MethodDocImpl
return true;
}
/**
* Return true if this method is default
*/
public boolean isDefault() {
return (sym.flags() & Flags.DEFAULT) != 0;
}
/**
* Return true if this method is abstract
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册