Package org.apache.shale.tiger.managed

Examples of org.apache.shale.tiger.managed.Property


            Field[] fields = fields(clazz);
            for (Field field : fields) {
                if (log().isTraceEnabled()) {
                    log().trace("  Scanning field '" + field.getName() + "'");
                }
                Property property = (Property) field.getAnnotation(Property.class);
                if (property != null) {
                    if (log().isDebugEnabled()) {
                        log().debug("  Field '" + field.getName() + "' has a @Property annotation");
                    }
                    ManagedPropertyConfig mpc = new ManagedPropertyConfig();
                    String name = property.name();
                    if ((name == null) || "".equals(name)) {
                        name = field.getName();
                    }
                    mpc.setName(name);
                    mpc.setType(field.getType().getName()); // FIXME - primitives, arrays, etc.
                    mpc.setValue(property.value());
                    mbc.addProperty(mpc);
                    continue;
                }
                // Support deprecated @Value annotation as well
                Value value = (Value) field.getAnnotation(Value.class);
View Full Code Here

TOP

Related Classes of org.apache.shale.tiger.managed.Property

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.