Package org.zanata.util

Examples of org.zanata.util.Introspectable


                            }
                        });
        if (!optional.isPresent()) {
            return Response.status(Response.Status.NOT_FOUND).build();
        }
        final Introspectable introspectable = optional.get();
        final String format = "%s:%s\n";
        Iterable<String> report =
                Iterables.transform(introspectable.getIntrospectableFieldNames(),
                        new Function<String, String>() {
                            @Override
                            public String apply(String fieldName) {
                                return String.format(format, fieldName,
                                        introspectable.getFieldValueAsString(
                                                fieldName));
                            }
                        });
        return Response
                .ok()
                .entity(introspectable.getIntrospectableId() + "{"
                        + Iterables.toString(report) + "}").build();
    }
View Full Code Here

TOP

Related Classes of org.zanata.util.Introspectable

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.