本文整理汇总了Java中libcore.util.EmptyArray.TYPE_VARIABLE属性的典型用法代码示例。如果您正苦于以下问题:Java EmptyArray.TYPE_VARIABLE属性的具体用法?Java EmptyArray.TYPE_VARIABLE怎么用?Java EmptyArray.TYPE_VARIABLE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类libcore.util.EmptyArray
的用法示例。
在下文中一共展示了EmptyArray.TYPE_VARIABLE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseForClass
/**
* Parses the generic signature of a class and creates the data structure
* representing the signature.
*
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
public void parseForClass(GenericDeclaration genericDecl, String signature) {
setInput(genericDecl, signature);
if (!eof) {
parseClassSignature();
} else {
if(genericDecl instanceof Class) {
Class c = (Class) genericDecl;
this.formalTypeParameters = EmptyArray.TYPE_VARIABLE;
this.superclassType = c.getSuperclass();
Class<?>[] interfaces = c.getInterfaces();
if (interfaces.length == 0) {
this.interfaceTypes = ListOfTypes.EMPTY;
} else {
this.interfaceTypes = new ListOfTypes(interfaces);
}
} else {
this.formalTypeParameters = EmptyArray.TYPE_VARIABLE;
this.superclassType = Object.class;
this.interfaceTypes = ListOfTypes.EMPTY;
}
}
}
示例2: parseForMethod
/**
* Parses the generic signature of a method and creates the data structure
* representing the signature.
*
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
public void parseForMethod(GenericDeclaration genericDecl,
String signature, Class<?>[] rawExceptionTypes) {
setInput(genericDecl, signature);
if (!eof) {
parseMethodTypeSignature(rawExceptionTypes);
} else {
Method m = (Method) genericDecl;
this.formalTypeParameters = EmptyArray.TYPE_VARIABLE;
Class<?>[] parameterTypes = m.getParameterTypes();
if (parameterTypes.length == 0) {
this.parameterTypes = ListOfTypes.EMPTY;
} else {
this.parameterTypes = new ListOfTypes(parameterTypes);
}
Class<?>[] exceptionTypes = m.getExceptionTypes();
if (exceptionTypes.length == 0) {
this.exceptionTypes = ListOfTypes.EMPTY;
} else {
this.exceptionTypes = new ListOfTypes(exceptionTypes);
}
this.returnType = m.getReturnType();
}
}
示例3: parseForConstructor
/**
* Parses the generic signature of a constructor and creates the data
* structure representing the signature.
*
* @param genericDecl the GenericDeclaration calling this method
* @param signature the generic signature of the class
*/
public void parseForConstructor(GenericDeclaration genericDecl,
String signature, Class<?>[] rawExceptionTypes) {
setInput(genericDecl, signature);
if (!eof) {
parseMethodTypeSignature(rawExceptionTypes);
} else {
Constructor c = (Constructor) genericDecl;
this.formalTypeParameters = EmptyArray.TYPE_VARIABLE;
Class<?>[] parameterTypes = c.getParameterTypes();
if (parameterTypes.length == 0) {
this.parameterTypes = ListOfTypes.EMPTY;
} else {
this.parameterTypes = new ListOfTypes(parameterTypes);
}
Class<?>[] exceptionTypes = c.getExceptionTypes();
if (exceptionTypes.length == 0) {
this.exceptionTypes = ListOfTypes.EMPTY;
} else {
this.exceptionTypes = new ListOfTypes(exceptionTypes);
}
}
}