当前位置: 首页>>代码示例>>Java>>正文


Java GenericSignatureFormatError类代码示例

本文整理汇总了Java中java.lang.reflect.GenericSignatureFormatError的典型用法代码示例。如果您正苦于以下问题:Java GenericSignatureFormatError类的具体用法?Java GenericSignatureFormatError怎么用?Java GenericSignatureFormatError使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


GenericSignatureFormatError类属于java.lang.reflect包,在下文中一共展示了GenericSignatureFormatError类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: parseFieldTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
private void parseFieldTypeSignature() {
  // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature | TypeVariableSignature.
  switch (symbol) {
    case 'L':
      parseClassTypeSignature();
      break;
    case '[':
      // ArrayTypeSignature ::= "[" TypSignature.
      actions.parsedSymbol(symbol);
      scanSymbol();
      updateTypeSignature();
      break;
    case 'T':
      updateTypeVariableSignature();
      break;
    default:
      throw new GenericSignatureFormatError();
  }
}
 
开发者ID:inferjay,项目名称:r8,代码行数:20,代码来源:GenericSignatureParser.java

示例2: parseFieldTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
Type parseFieldTypeSignature() {
    // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
    //         | TypeVariableSignature.

    switch (symbol) {
    case 'L':
        return parseClassTypeSignature();
    case '[':
        // ArrayTypeSignature ::= "[" TypSignature.
        scanSymbol();
        return new GenericArrayTypeImpl(parseTypeSignature());
    case 'T':
        return parseTypeVariableSignature();
    default:
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:18,代码来源:GenericSignatureParser.java

示例3: parseFieldTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
Type parseFieldTypeSignature() {
    // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
    //         | TypeVariableSignature.

    switch (symbol) {
    case 'L':
        return parseClassTypeSignature();
    case '[':
        // ArrayTypeSignature ::= "[" TypSignature.
        scanSymbol();
        return new ImplForArray(parseTypeSignature());
    case 'T':
        return parseTypeVariableSignature();
    default:
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:18,代码来源:GenericSignatureParser.java

示例4: getGenericSuperclass

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
public Type getGenericSuperclass() throws GenericSignatureFormatError, TypeNotPresentException, MalformedParameterizedTypeException  {
    String tmp;
    if (isInterface() || ((tmp = getCanonicalName()) != null && tmp.equals("java.lang.Object")) || isPrimitive()) {
        return null;
    }
    if (isArray()) {
        return (Type) OBJECT_CLASS;
    }
    
    Class<?> clazz = getSuperclass();
    if (clazz.getTypeParameters().length == 0) {
        return (Type) clazz;
    }
    
    return getCache().getGenericSuperclass();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:17,代码来源:Class.java

示例5: parseFieldTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
Type parseFieldTypeSignature() {
    // FieldTypeSignature ::= ClassTypeSignature | ArrayTypeSignature
    //         | TypeVariableSignature.
 
    switch (symbol) {
    case 'L':
        return parseClassTypeSignature();
    case '[':
        // ArrayTypeSignature ::= "[" TypSignature.
        scanSymbol();
        return new ImplForArray(parseTypeSignature());
    case 'T':
        return parseTypeVariableSignature();
    default:
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:shannah,项目名称:cn1,代码行数:18,代码来源:GenericSignatureParser.java

示例6: expect

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
private void expect(char c) {
  if (symbol == c) {
    scanSymbol();
  } else {
    throw new GenericSignatureFormatError();
  }
}
 
开发者ID:inferjay,项目名称:r8,代码行数:8,代码来源:GenericSignatureParser.java

示例7: parseMessage

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
@Test
public void parseMessage() {
	// Assert.assertEquals("操作数据库出错,请稍后重试.", ErrorUtil.parseMessage(new InvalidParamDataAccessException("message")));
	Assert.assertEquals("操作数据库出错,请稍后重试.", ErrorUtil.parseMessage(new SQLException("message")));
	// Assert.assertEquals("操作数据库出错,请稍后重试.", ErrorUtil.parseMessage(new JedisConnectionException("message")));
	// Assert.assertEquals("访问外部接口出错,请稍后重试.", ErrorUtil.parseMessage(new OutSideException("message")));
	Assert.assertEquals("更新程序后,还没有重启服务.", ErrorUtil.parseMessage(new GenericSignatureFormatError()));

	Assert.assertEquals("message", ErrorUtil.parseMessage(new IllegalArgumentException("message")));
	// Assert.assertEquals("message", ErrorUtil.parseMessage(new LeopardRuntimeException("message")));
	// Assert.assertEquals("message", ErrorUtil.parseMessage(new LeopardException("message")));
	Assert.assertEquals("message", ErrorUtil.parseMessage(new RuntimeException("message")));
	Assert.assertEquals("未知错误.", ErrorUtil.parseMessage(new Exception("message")));
}
 
开发者ID:tanhaichao,项目名称:leopard,代码行数:15,代码来源:ErrorUtilTest.java

示例8: readFieldTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
Type readFieldTypeSignature()
{
    switch (peekChar())
    {
        case 'L':
            return readClassTypeSignature();
        case '[':
            return readArrayTypeSignature();
        case 'T':
            return readTypeVariableSignature();
        default:
            throw new GenericSignatureFormatError();
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:15,代码来源:GenericSignatureParser.java

示例9: readArrayTypeSignature

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
Type readArrayTypeSignature()
{
    consume('[');
    switch (peekChar())
    {
        case 'L':
        case '[':
        case 'T':
            return new GenericArrayTypeImpl(readFieldTypeSignature());
        case 'Z':
            consume('Z');
            return boolean[].class;
        case 'B':
            consume('B');
            return byte[].class;
        case 'S':
            consume('S');
            return short[].class;
        case 'C':
            consume('C');
            return char[].class;
        case 'I':
            consume('I');
            return int[].class;
        case 'F':
            consume('F');
            return float[].class;
        case 'J':
            consume('J');
            return long[].class;
        case 'D':
            consume('D');
            return double[].class;
        default:
            throw new GenericSignatureFormatError();
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:38,代码来源:GenericSignatureParser.java

示例10: scanSymbol

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
void scanSymbol() {
    if (!eof) {
        if (pos < buffer.length) {
            symbol = buffer[pos];
            pos++;
        } else {
            symbol = 0;
            eof = true;
        }
    } else {
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:14,代码来源:GenericSignatureParser.java

示例11: expect

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
void expect(char c) {
    if (symbol == c) {
        scanSymbol();
    } else {
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:8,代码来源:GenericSignatureParser.java

示例12: scanIdentifier

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
void scanIdentifier() {
    if (!eof) {
        StringBuilder identBuf = new StringBuilder(32);
        if (!isStopSymbol(symbol)) {
            identBuf.append(symbol);
            do {
                char ch = buffer[pos];
                if ((ch >= 'a') && (ch <= 'z') || (ch >= 'A') && (ch <= 'Z')
                        || !isStopSymbol(ch)) {
                    identBuf.append(ch);
                    pos++;
                } else {
                    identifier = identBuf.toString();
                    scanSymbol();
                    return;
                }
            } while (pos != buffer.length);
            identifier = identBuf.toString();
            symbol = 0;
            eof = true;
        } else {
            // Ident starts with incorrect char.
            symbol = 0;
            eof = true;
            throw new GenericSignatureFormatError();
        }
    } else {
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:Sellegit,项目名称:j2objc,代码行数:31,代码来源:GenericSignatureParser.java

示例13: scanIdentifier

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
void scanIdentifier() {
    if (!eof) {
        StringBuilder identBuf = new StringBuilder(32);
        if (!isStopSymbol(symbol)) {
            identBuf.append(symbol);
            do {
                char ch = buffer[pos];
                if ((ch >= 'a') && (ch <= 'z') || (ch >= 'A') && (ch <= 'Z')
                        || !isStopSymbol(ch)) {
                    identBuf.append(buffer[pos]);
                    pos++;
                } else {
                    identifier = identBuf.toString();
                    scanSymbol();
                    return;
                }
            } while (pos != buffer.length);
            identifier = identBuf.toString();
            symbol = 0;
            eof = true;
        } else {
            // Ident starts with incorrect char.
            symbol = 0;
            eof = true;
            throw new GenericSignatureFormatError();
        }
    } else {
        throw new GenericSignatureFormatError();
    }
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:31,代码来源:GenericSignatureParser.java

示例14: test_Constructor

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
@TestTargetNew(
    level = TestLevel.PARTIAL_COMPLETE,
    notes = "",
    method = "GenericSignatureFormatError",
    args = {}
)
public void test_Constructor() {
    assertNotNull(new GenericSignatureFormatError());
}
 
开发者ID:keplersj,项目名称:In-the-Box-Fork,代码行数:10,代码来源:GenericSignatureFormatErrorTest.java

示例15: getGenericInterfaces

import java.lang.reflect.GenericSignatureFormatError; //导入依赖的package包/类
public Type[] getGenericInterfaces() throws GenericSignatureFormatError, TypeNotPresentException, MalformedParameterizedTypeException {
    if (isArray()) {
        return new Type[]{CLONEABLE_CLASS, SERIALIZABLE_CLASS};
    }
    if (isPrimitive()) {
        return new Type[0];
    }
    
    return (Type[])getCache().getGenericInterfaces().clone();
}
 
开发者ID:shannah,项目名称:cn1,代码行数:11,代码来源:Class.java


注:本文中的java.lang.reflect.GenericSignatureFormatError类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。