Package com.jd.glowworm

Examples of com.jd.glowworm.PBException


    }

    if (type instanceof Class<?>) {
      Class<?> clazz = (Class<?>) type;
      if (clazz.isInterface()) {
        throw new PBException("unsupport type " + type);
      }

      try {
        return (Map<Object, Object>) clazz.newInstance();
      } catch (Exception e) {
        throw new PBException("unsupport type " + type, e);
      }
    }

    throw new PBException("unsupport type " + type);
  }
View Full Code Here


    public static Class<?> forName(String className) {
        try {
            ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
            return classLoader.loadClass(className);
        } catch (ClassNotFoundException e) {
            throw new PBException("class nout found : " + className);
        }
    }
View Full Code Here

                        _loadCreatorParameters(context, mw);
                        mw.visitMethodInsn(INVOKESTATIC, getType(factoryMethod.getDeclaringClass()),
                                           factoryMethod.getName(), getDesc(factoryMethod));
                        mw.visitVarInsn(ASTORE, context.var("instance"));
                    } else {
                        throw new PBException("TODO");
                    }
                }
            }
        }
View Full Code Here

       
        if (asm) {
            try {
                return theASMSerializerFactory.createJavaBeanSerializer(clazz);
            } catch (Throwable e) {
                throw new PBException("create asm serializer error, class " + clazz, e);
            }
        }

        return new JavaBeanSerializer(clazz);
    }
View Full Code Here

        if (type instanceof TypeVariable) {
            return (T) obj;
        }

        throw new PBException("can not cast to : " + type);
    }
View Full Code Here

            if (strVal.length() == 0) {
                return null;
            }
        }

        throw new PBException("can not cast to : " + clazz.getName());
    }
View Full Code Here

                }
            }

            return object;
        } catch (Exception e) {
            throw new PBException(e.getMessage(), e);
        }
    }
View Full Code Here

            if ("1".equals(str)) {
                return Boolean.TRUE;
            }
        }

        throw new PBException("can not cast to int, value : " + value);
    }
View Full Code Here

                return null;
            }
            return Byte.parseByte(strVal);
        }

        throw new PBException("can not cast to byte, value : " + value);
    }
View Full Code Here

            if (strVal.length() == 0) {
                return null;
            }

            if (strVal.length() != 1) {
                throw new PBException("can not cast to byte, value : " + value);
            }

            return strVal.charAt(0);
        }

        throw new PBException("can not cast to byte, value : " + value);
    }
View Full Code Here

TOP

Related Classes of com.jd.glowworm.PBException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.