本文整理了Java中com.google.common.reflect.Element.isProtected()
方法的一些代码示例,展示了Element.isProtected()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.isProtected()
方法的具体详情如下:
包路径:com.google.common.reflect.Element
类名称:Element
方法名:isProtected
[英]Returns true if the element is protected.
[中]如果元素受保护,则返回true。
代码示例来源:origin: google/guava
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: google/j2objc
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: wildfly/wildfly
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: google/guava
public void testPrivateMethod() throws Exception {
Element element = A.method("privateMethod");
assertFalse(element.isAbstract());
assertTrue(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isPublic());
assertFalse(element.isProtected());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: google/guava
public void testPublicField() throws Exception {
Element element = A.field("publicField");
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isProtected());
assertTrue(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: google/guava
public void testProtectedField() throws Exception {
Element element = A.field("protectedField");
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertTrue(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: google/guava
public void testProtectedMethod() throws Exception {
Element element = A.method("protectedMethod");
assertFalse(element.isAbstract());
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isFinal());
assertFalse(element.isPublic());
assertTrue(element.isProtected());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: google/guava
public void testPackagePrivateField() throws Exception {
Element element = A.field("packagePrivateField");
assertFalse(element.isPrivate());
assertTrue(element.isPackagePrivate());
assertFalse(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: google/guava
public void testPrivateField() throws Exception {
Element element = A.field("privateField");
assertTrue(element.isPrivate());
assertFalse(element.isAbstract());
assertFalse(element.isPackagePrivate());
assertFalse(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: com.google.guava/guava-jdk5
/** Returns true if the element is package-private. */
public final boolean isPackagePrivate() {
return !isPrivate() && !isPublic() && !isProtected();
}
代码示例来源:origin: com.google.guava/guava-tests
public void testPrivateMethod() throws Exception {
Element element = A.method("privateMethod");
assertFalse(element.isAbstract());
assertTrue(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isPublic());
assertFalse(element.isProtected());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: com.google.guava/guava-tests
public void testPublicField() throws Exception {
Element element = A.field("publicField");
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isProtected());
assertTrue(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: com.google.guava/guava-tests
public void testPackagePrivateField() throws Exception {
Element element = A.field("packagePrivateField");
assertFalse(element.isPrivate());
assertTrue(element.isPackagePrivate());
assertFalse(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: com.google.guava/guava-tests
public void testProtectedMethod() throws Exception {
Element element = A.method("protectedMethod");
assertFalse(element.isAbstract());
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertFalse(element.isFinal());
assertFalse(element.isPublic());
assertTrue(element.isProtected());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: com.google.guava/guava-tests
public void testProtectedField() throws Exception {
Element element = A.field("protectedField");
assertFalse(element.isPrivate());
assertFalse(element.isPackagePrivate());
assertTrue(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
代码示例来源:origin: com.google.guava/guava-tests
public void testPrivateField() throws Exception {
Element element = A.field("privateField");
assertTrue(element.isPrivate());
assertFalse(element.isAbstract());
assertFalse(element.isPackagePrivate());
assertFalse(element.isProtected());
assertFalse(element.isPublic());
assertFalse(element.isFinal());
assertFalse(element.isStatic());
assertTrue(element.isAnnotationPresent(Tested.class));
}
内容来源于网络,如有侵权,请联系作者删除!