Package org.timepedia.exporter.client

Examples of org.timepedia.exporter.client.Export


 
  public boolean isExportable(JAbstractMethod method, JExportableClassType type) {
    boolean export = false;
    // Only public methods are exported
    if (method.isPublic()) {
      Export e;
      if (method instanceof JConstructor && isInstantiable(method.getEnclosingType()) && method.getParameters().length == 0) {
        // zero-arg constructors always exportable
        export =  true;
      } else if (isNotExportable(method.getAnnotation(NoExport.class))) {
        // Do not export methods annotated as NoExport, although the
        // method is marked as export in an interface or the entire class
        // is annotated as Export
        export = false;
      } else if (isExportable(method.getAnnotation(Export.class))) {
        // Export this method if has the Export annotation
        export = true;
      } else if (isExportable(method.getEnclosingType())) {
        // Export all method in a class annotated as Export
        export = true;
      } else if (type != null && (e = type.getType().getAnnotation(Export.class)) != null && e.all()) {
        // Export this method if the class has the Export.all attribute set
        // Filter some generic methods present in Object
        export = !method.getName().matches("getClass|hashCode|equals|notify|notifyAll|wait");
      } else {
        // Export methods which are annotated in implemented interfaces
View Full Code Here


    }
    return pkg + getJSExportName();
  }
 
  public String getJSExportName () {
    Export ann = type.getAnnotation(Export.class);
    JClassType type = getTypeToExport();
    return ann != null && !ann.value().isEmpty() ? ann.value() : type.getName();
  }
View Full Code Here

    if (isExportInstanceMethod()) {
      anValue = method.getAnnotation(ExportInstanceMethod.class).value();
    } else if (isExportStaticMethod()) {
      anValue = method.getAnnotation(ExportStaticMethod.class).value();
    } else {
      Export ann = method.getAnnotation(Export.class);
      anValue = ann != null ? ann.value().trim() : "";
    }

    if (!anValue.isEmpty()) {
      exportName = anValue;
     
View Full Code Here

  public JExportableField(JExportableClassType enclosingExportType,
      JField field) {
    this.enclosingExportType = enclosingExportType;
    this.field = field;
    Export ann = field.getAnnotation(Export.class);

    if (ann != null && ann.value().length() > 0) {
      exportName = ann.value();
    } else {
      exportName = field.getName();
    }
  }
View Full Code Here

  public JExportableMethod(JExportableClassType exportableEnclosingType,
      JAbstractMethod method) {
    this.exportableEnclosingType = exportableEnclosingType;
    this.method = method;
    Export ann = method.getAnnotation(Export.class);

    if (ann != null && ann.value().length() > 0) {
      exportName = ann.value();
    } else {
      exportName = method.getName();
    }
  }
View Full Code Here

TOP

Related Classes of org.timepedia.exporter.client.Export

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.