Package org.glassfish.enterprise.ha.store.annotations

Examples of org.glassfish.enterprise.ha.store.annotations.Attribute


    private static <S> void loadAttributeInfo(Class<S> clazz, Method m, HashMap<String, AttributeInfo> attrInfoMap)
            throws NoSuchMethodException {

        String methodName = m.getName();
        Attribute attr = (Attribute) m.getAnnotation(Attribute.class);
        if (attr != null) {
            if (methodName.startsWith("set")) {
                String attrName = attr.name();
                if (attrName == null || attrName.length() == 0) {
                    if (methodName.length() < 4) {
                        throw new RuntimeException("Invalid method name" + methodName);
                    } else {
                        attrName = ("" + methodName.charAt(3)).toLowerCase() + methodName.substring(4);
View Full Code Here


                Collection<? extends MethodDeclaration> methods = classDecl.getMethods();
                ParameterDeclaration paramType = null;
                for (MethodDeclaration m : setterFilter.filter(methods)) {
                    MethodInfo methodInfo = new MethodInfo();
                    String attributeName = null;
                    Attribute attrAnn = m.getAnnotation(Attribute.class);
                    if (attrAnn != null) {
                        attributeName = attrAnn.name();
                        methodInfo.type = MethodInfo.MethodType.SETTER;
                    } else {
                        Version versionAnn = m.getAnnotation(Version.class);
                        if (versionAnn != null) {
                            attributeName = versionAnn.name();
View Full Code Here

TOP

Related Classes of org.glassfish.enterprise.ha.store.annotations.Attribute

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.