Package org.auraframework.system.Annotations

Examples of org.auraframework.system.Annotations.Type


        if (!Modifier.isPublic(modifiers) || Modifier.isStatic(modifiers) || method.getParameterTypes().length > 0) {
            throw new InvalidDefinitionException(String.format("@AuraEnabled annotation found on invalid method %s",
                    method.getName()), new Location("java://" + method.getDeclaringClass().getCanonicalName(), 0));
        }
        Type type = method.getAnnotation(Type.class);
        if (type == null) {
            //
            // FIXME: need better checks here, including doing things like
            // List<Type>, arrays also need to be handled here.
            //
            if (Void.TYPE.equals(method.getGenericReturnType())) {
                throw new InvalidDefinitionException(String.format("@AuraEnabled annotation found on void method %s",
                        method.getName()), new Location("java://" + method.getDeclaringClass().getCanonicalName(), 0));
            }
            return DefDescriptorImpl.getInstance("java://" + method.getReturnType().getName(), TypeDef.class);
        } else {
            return DefDescriptorImpl.getInstance(type.value(), TypeDef.class);
        }
    }
View Full Code Here

TOP

Related Classes of org.auraframework.system.Annotations.Type

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.