Package com.jd.glowworm

Examples of com.jd.glowworm.PBException


                return null;
            }
            return Short.parseShort(strVal);
        }

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


            }

            return Float.parseFloat(strVal);
        }

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

                return null;
            }
            return Double.parseDouble(strVal);
        }

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

            }

            return Integer.parseInt(strVal);
        }

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

        }

        if (value instanceof String) {
            return Base64.decodeFast((String) value);
        }
        throw new PBException("can not cast to int, value : " + value);
    }
View Full Code Here

            }

            return Long.parseLong(strVal);
        }

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

 
                  Object propertyValue = fieldSerializer.getPropertyValue(object);
                  fieldSerializer.writeProperty(serializer, propertyValue, i);
              }
        } catch (Exception e) {
            throw new PBException("write javaBean error", e);
        }
    }
View Full Code Here

                object = constructor.newInstance();
            } else {
                object = constructor.newInstance(parser.getObject());
            }
        } catch (Exception e) {
            throw new PBException("create instance error, class " + clazz.getName(), e);
        }
       
        return object;
    }
View Full Code Here

                if (beanInfo.getCreatorConstructor() != null) {
                    try {
                        object = beanInfo.getCreatorConstructor().newInstance(params);
                    } catch (Exception e) {
                        throw new PBException("create instance error, "
                                                + beanInfo.getCreatorConstructor().toGenericString(), e);
                    }
                } else if (beanInfo.getFactoryMethod() != null) {
                    try {
                        object = beanInfo.getFactoryMethod().invoke(null, params);
                    } catch (Exception e) {
                        throw new PBException("create factory method error, "
                                                + beanInfo.getFactoryMethod().toString(), e);
                    }
                }
            }
View Full Code Here

            list = new ArrayList();
        } else {
            try {
                list = (Collection) rawClass.newInstance();
            } catch (Exception e) {
                throw new PBException("create instane error, class " + rawClass.getName());
            }
        }

        Type itemType;
        if (type instanceof ParameterizedType) {
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.