Package org.codehaus.groovy.runtime.metaclass

Examples of org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack


    //  --------------------------------------------------------
    //                   exception handling
    //  --------------------------------------------------------
    public static Throwable unwrap(GroovyRuntimeException gre) {
        if (gre instanceof MissingPropertyExceptionNoStack) {
            MissingPropertyExceptionNoStack noStack = (MissingPropertyExceptionNoStack) gre;
            return new MissingPropertyException(noStack.getProperty(), noStack.getType());
        }

        if (gre instanceof MissingMethodExceptionNoStack) {
            MissingMethodExceptionNoStack noStack = (MissingMethodExceptionNoStack) gre;
            return new MissingMethodException(noStack.getMethod(), noStack.getType(), noStack.getArguments(), noStack.isStatic());
        }

        Throwable th = gre;
        if (th.getCause() != null && th.getCause() != gre) th = th.getCause();
        if (th != gre && (th instanceof GroovyRuntimeException)) return unwrap((GroovyRuntimeException) th);
View Full Code Here


      if (!propertyName.substring(0, 1).equals(propertyName.substring(0, 1).toUpperCase())) {
        propertyName = propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1);
      }
      return server.getAttribute(objectName, propertyName);
    } catch (AttributeNotFoundException e) {
      throw new MissingPropertyExceptionNoStack(propertyName, server.getClass());
    } catch (InstanceNotFoundException e) {
      throw ThrowableManagerRegistry.caught(e);
    } catch (MBeanException e) {
      throw ThrowableManagerRegistry.caught(e);
    } catch (ReflectionException e) {
View Full Code Here

    } catch (InstanceNotFoundException e) {
      throw ThrowableManagerRegistry.caught(e);
    } catch (InvalidAttributeValueException e) {
      throw ThrowableManagerRegistry.caught(e);
    } catch (AttributeNotFoundException e) {
      throw new MissingPropertyExceptionNoStack(propertyName, server.getClass());
    } catch (ReflectionException e) {
      throw ThrowableManagerRegistry.caught(e);
    } catch (MBeanException e) {
      throw ThrowableManagerRegistry.caught(e);
    }
View Full Code Here

    //  --------------------------------------------------------
    //                   exception handling
    //  --------------------------------------------------------
    private static Throwable unwrap(GroovyRuntimeException gre) {
        if (gre instanceof MissingPropertyExceptionNoStack) {
            MissingPropertyExceptionNoStack noStack = (MissingPropertyExceptionNoStack) gre;
            return new MissingPropertyException(noStack.getProperty(), noStack.getType());
        }

        if (gre instanceof MissingMethodExceptionNoStack) {
            MissingMethodExceptionNoStack noStack = (MissingMethodExceptionNoStack) gre;
            return new MissingMethodException(noStack.getMethod(), noStack.getType(), noStack.getArguments(), noStack.isStatic());
        }

        Throwable th = gre;
        if (th.getCause() != null && th.getCause() != gre) th = th.getCause();
        if (th != gre && (th instanceof GroovyRuntimeException)) return unwrap((GroovyRuntimeException) th);
View Full Code Here

    //  --------------------------------------------------------
    //                   exception handling
    //  --------------------------------------------------------
    private static Throwable unwrap(GroovyRuntimeException gre) {
        if (gre instanceof MissingPropertyExceptionNoStack) {
            MissingPropertyExceptionNoStack noStack = (MissingPropertyExceptionNoStack) gre;
            return new MissingPropertyException(noStack.getProperty(), noStack.getType());
        }

        if (gre instanceof MissingMethodExceptionNoStack) {
            MissingMethodExceptionNoStack noStack = (MissingMethodExceptionNoStack) gre;
            return new MissingMethodException(noStack.getMethod(), noStack.getType(), noStack.getArguments(), noStack.isStatic());
        }

        Throwable th = gre;
        if (th.getCause() != null && th.getCause() != gre) th = th.getCause();
        if (th != gre && (th instanceof GroovyRuntimeException)) return unwrap((GroovyRuntimeException) th);
View Full Code Here

             else {
               metaProperty.setProperty(instance, optionalValue);
               return null;
             }
        }
        throw new MissingPropertyExceptionNoStack(propertyName, theClass);
    }
View Full Code Here

             else {
               metaProperty.setProperty(instance, optionalValue);
               return null;
             }
        }
        throw new MissingPropertyExceptionNoStack(propertyName, theClass);
    }
View Full Code Here

    //  --------------------------------------------------------
    //                   exception handling
    //  --------------------------------------------------------
    public static Throwable unwrap(GroovyRuntimeException gre) {
        if (gre instanceof MissingPropertyExceptionNoStack) {
            MissingPropertyExceptionNoStack noStack = (MissingPropertyExceptionNoStack) gre;
            return new MissingPropertyException(noStack.getProperty(), noStack.getType());
        }

        if (gre instanceof MissingMethodExceptionNoStack) {
            MissingMethodExceptionNoStack noStack = (MissingMethodExceptionNoStack) gre;
            return new MissingMethodException(noStack.getMethod(), noStack.getType(), noStack.getArguments(), noStack.isStatic());
        }

        Throwable th = gre;
        if (th.getCause() != null && th.getCause() != gre) th = th.getCause();
        if (th != gre && (th instanceof GroovyRuntimeException)) return unwrap((GroovyRuntimeException) th);
View Full Code Here

    //  --------------------------------------------------------
    //                   exception handling
    //  --------------------------------------------------------
    private static Throwable unwrap(GroovyRuntimeException gre) {
        if (gre instanceof MissingPropertyExceptionNoStack) {
            MissingPropertyExceptionNoStack noStack = (MissingPropertyExceptionNoStack) gre;
            return new MissingPropertyException(noStack.getProperty(), noStack.getType());
        }

        if (gre instanceof MissingMethodExceptionNoStack) {
            MissingMethodExceptionNoStack noStack = (MissingMethodExceptionNoStack) gre;
            return new MissingMethodException(noStack.getMethod(), noStack.getType(), noStack.getArguments(), noStack.isStatic());
        }

        Throwable th = gre;
        if (th.getCause() != null && th.getCause() != gre) th = th.getCause();
        if (th != gre && (th instanceof GroovyRuntimeException)) return unwrap((GroovyRuntimeException) th);
View Full Code Here

             else {
               metaProperty.setProperty(instance, optionalValue);
               return null;
             }
        }
        throw new MissingPropertyExceptionNoStack(propertyName, theClass);
    }
View Full Code Here

TOP

Related Classes of org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack

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.