本文整理了Java中com.google.common.reflect.Element.getDeclaringClass()
方法的一些代码示例,展示了Element.getDeclaringClass()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.getDeclaringClass()
方法的具体详情如下:
包路径:com.google.common.reflect.Element
类名称:Element
方法名:getDeclaringClass
暂无
代码示例来源:origin: google/guava
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override
public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: google/j2objc
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override
public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: google/guava
public TypeToken<?> getOwnerType() {
return TypeToken.of(getDeclaringClass());
}
代码示例来源:origin: wildfly/wildfly
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override
public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: google/j2objc
public TypeToken<?> getOwnerType() {
return TypeToken.of(getDeclaringClass());
}
代码示例来源:origin: wildfly/wildfly
public TypeToken<?> getOwnerType() {
return TypeToken.of(getDeclaringClass());
}
代码示例来源:origin: google/guava
static Element constructor() throws Exception {
Constructor<?> constructor = A.class.getDeclaredConstructor(Object.class);
Element element = new Element(constructor);
assertEquals(constructor.getName(), element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
代码示例来源:origin: google/guava
static Element method(String name, Class<?>... parameterTypes) throws Exception {
Element element = new Element(A.class.getDeclaredMethod(name, parameterTypes));
assertEquals(name, element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
代码示例来源:origin: google/guava
static Element field(String name) throws Exception {
Element element = new Element(A.class.getDeclaredField(name));
assertEquals(name, element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override
public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override
public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: com.google.guava/guava-jdk5
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
@SuppressWarnings("unchecked") // The declaring class is T's raw class, or one of its supertypes.
@Override public final Class<? super T> getDeclaringClass() {
return (Class<? super T>) super.getDeclaringClass();
}
代码示例来源:origin: Nextdoor/bender
public TypeToken<?> getOwnerType() {
return TypeToken.of(getDeclaringClass());
}
代码示例来源:origin: org.jboss.eap/wildfly-client-all
public TypeToken<?> getOwnerType() {
return TypeToken.of(getDeclaringClass());
}
代码示例来源:origin: com.google.guava/guava-tests
static Element constructor() throws Exception {
Constructor<?> constructor = A.class.getDeclaredConstructor(Object.class);
Element element = new Element(constructor);
assertEquals(constructor.getName(), element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
代码示例来源:origin: com.google.guava/guava-tests
static Element field(String name) throws Exception {
Element element = new Element(A.class.getDeclaredField(name));
assertEquals(name, element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
代码示例来源:origin: com.google.guava/guava-tests
static Element method(String name, Class<?>... parameterTypes) throws Exception {
Element element = new Element(A.class.getDeclaredMethod(name, parameterTypes));
assertEquals(name, element.getName());
assertEquals(A.class, element.getDeclaringClass());
return element;
}
内容来源于网络,如有侵权,请联系作者删除!