Package oms3.annotations

Examples of oms3.annotations.Label


                    if (uiHintStr.contains(OmsBoxConstants.HIDE_UI_HINT)) {
                        continue;
                    }
                }

                Label category = moduleClass.getAnnotation(Label.class);
                String categoryStr = OmsBoxConstants.CATEGORY_OTHERS;
                if (category != null && categoryStr.trim().length() > 1) {
                    categoryStr = category.value();
                }
                if (moduleClass.getName().endsWith("Buffer")) {
                    System.out.println();
                }
               
View Full Code Here


            sb.append("</ul>").append(NEWLINE);
            sb.append("</blockquote>");
            sb.append(NEWLINE);
        }
        // general info: license
        License license = moduleClass.getAnnotation(License.class);
        if (license != null) {
            String licenseStr = AnnotationUtilities.getLocalizedLicense(license);
            sb.append("<blockquote>");
            sb.append(" License: " + licenseStr).append(NEWLINE);
            sb.append("</blockquote>");
View Full Code Here

            sb.append("</blockquote>");
            sb.append(NEWLINE);
        }

        // general info: script name
        Name name = moduleClass.getAnnotation(Name.class);
        String nameStr = AnnotationUtilities.getLocalizedName(name);
        if (name != null) {
            sb.append("<blockquote>");
            sb.append(" Name to use in a script: <b>" + nameStr + "</b>").append(NEWLINE);
            sb.append("</blockquote>");
View Full Code Here

        this.description = description;
        this.omsStatus = omsStatus;

        name = className.substring(className.lastIndexOf('.') + 1);

        Name nameAnn = moduleClass.getAnnotation(Name.class);
        if (nameAnn != null) {
            scriptName = nameAnn.value();
        } else {
            scriptName = className;
        }

        int statusValue = oms3.annotations.Status.DRAFT;
View Full Code Here

                    } catch (Exception e) {
                        // ignore and try to gather as much as possible
                    }
                    if (possibleModulesClass != null) {
                        // extract only the ones properly annotated
                        Name name = possibleModulesClass.getAnnotation(Name.class);
                        if (name != null) {
                            classesList.add(possibleModulesClass);
                        }
                    }
                }
View Full Code Here

        if (unitAnn != null) {
            sb.append(" [");
            sb.append(unitAnn.value());
            sb.append("]");
        }
        Range rangeAnn = field.getAnnotation(Range.class);
        if (rangeAnn != null) {
            sb.append(" [");
            sb.append(rangeAnn.min());
            sb.append(" ,");
            sb.append(rangeAnn.max());
            sb.append("]");
        }
        descriptionStr = sb.toString();

        String fieldName = field.getName();
View Full Code Here

        if (unitAnn != null) {
            sb.append(" [");
            sb.append(unitAnn.value());
            sb.append("]");
        }
        Range rangeAnn = field.getAnnotation(Range.class);
        if (rangeAnn != null) {
            sb.append(" [");
            sb.append(rangeAnn.min());
            sb.append(" ,");
            sb.append(rangeAnn.max());
            sb.append("]");
        }
        descriptionStr = sb.toString();

        String fieldName = field.getName();
View Full Code Here

        }
        // general info
        sb.append("<h2>General Information</h2>").append(NEWLINE);
        sb.append(NEWLINE);
        // general info: status
        Status status = moduleClass.getAnnotation(Status.class);
        if (status != null) {
            sb.append("<blockquote>");
            sb.append("Module status: " + getStatusString(status.value())).append(NEWLINE);
            sb.append("</blockquote>");
            sb.append(NEWLINE);
        }

        // general info: script name
View Full Code Here

                Description description = moduleClass.getAnnotation(Description.class);
                String descrStr = null;
                if (description != null) {
                    descrStr = description.value();
                }
                Status status = moduleClass.getAnnotation(Status.class);

                ModuleDescription module = new ModuleDescription(moduleClass, categoryStr, descrStr, status);

                Object newInstance = null;
                try {
View Full Code Here

        // clean up html docs in config area, it will be redone
        OmsBoxUtils.cleanModuleDocumentation();

        for( Class< ? > moduleClass : classesList ) {
            try {
                UI uiHints = moduleClass.getAnnotation(UI.class);
                if (uiHints != null) {
                    String uiHintStr = uiHints.value();
                    if (uiHintStr.contains(OmsBoxConstants.HIDE_UI_HINT)) {
                        continue;
                    }
                }
View Full Code Here

TOP

Related Classes of oms3.annotations.Label

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.