Package com.google.gwt.search.jsio.client.impl

Examples of com.google.gwt.search.jsio.client.impl.MetaDataName


      logger.log(TreeLogger.TRACE, "Found Annotation instance", null);
      return toReturn;
    }

    // Otherwise, fall back to HasMetaData
    MetaDataName metaDataName = annotation.getAnnotation(MetaDataName.class);
    if (metaDataName == null) {
      // Indicates that the requested annotation doesn't have legacy support
      logger.log(TreeLogger.TRACE, "No legacy support for this annotation",
          null);
      return null;
    }

    String tagName = metaDataName.value();
    boolean hasTag = false;
    for (String tag : target.getMetaDataTags()) {
      if (tagName.equals(tag)) {
        hasTag = true;
        if (!SUPPRESS_WARNINGS) {
          logger.log(TreeLogger.WARN, target
              + " uses deprecated metadata.  Replace with annotation "
              + annotation.getName(), null);
        }
        break;
      }
    }
    if (!hasTag) {
      logger.log(TreeLogger.TRACE, "No metadata with tag " + tagName, null);
      return null;
    }

    Object value;
    try {
      Method valueMethod = annotation.getMethod("value");
      Class<?> returnType = valueMethod.getReturnType();
      String[][] metaData = target.getMetaData(metaDataName.value());

      // Use the default value if there's no value in the metadata
      Object annotationDefaultValue;
      try {
        annotationDefaultValue = annotation.getMethod("value").getDefaultValue();
View Full Code Here

TOP

Related Classes of com.google.gwt.search.jsio.client.impl.MetaDataName

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.