Examples of Label


Examples of br.com.caelum.vraptor.asm.Label

    @Override
    public void visitTypeInsn(final int opcode, final String type) {
        if (opcode == Opcodes.NEW) {
            if (labels == null) {
                Label l = new Label();
                labels = new ArrayList(3);
                labels.add(l);
                if (mv != null) {
                    mv.visitLabel(l);
                }
View Full Code Here

Examples of cc.mallet.types.Label

                                 Label backgroundTag)
  {
    int i = 0;
    int docidx = 0;
    while (i < tags.size ()) {
      Label thisTag = dict.lookupLabel (tags.get (i).toString ());
      int startTokenIdx = i;
      while (++i < tags.size ()) {
        Label nextTag = dict.lookupLabel (tags.get (i).toString ());
        if (isBeginTag (nextTag) || !tagsMatch (thisTag, nextTag)) break;
      }
      int endTokenIdx = i;
      Span span = createSpan (input, startTokenIdx, endTokenIdx);
      addBackgroundIfNecessary (labeled, (StringSpan) span, docidx, backgroundTag);
View Full Code Here

Examples of ch.sahits.game.graphic.layout.Label

   * Creating a label. The name may be null identifying the label a place holder
   * @param name
   * @return
   */
  private ISahitsComponent addLabel(String name) {
    Label label = new Label(metic);
    if (name!=null){
      label.setText(name);
    }
    setFont(label);
    add(label,new MaximalGridLayoutConstraints(ECellPosition.RIGHT));
    return label;
  }
View Full Code Here

Examples of cl.alejo.jcsim.csim.gates.Label

    aOr2 = new GateAssoc(circuit, descAOr2, paramAssocOr2);
    aOr3 = new GateAssoc(circuit, descAOr3, paramAssocOr3);
    aOr4 = new GateAssoc(circuit, descAOr4, paramAssocOr4);
    diagram = new TimeDiagram(circuit, descDiagram, new ParamVoid());
    template = new TemplateGate(circuit, descTemplate, new ParamVoid());
    label = new Label(circuit, descLabel, paramLabel);
    treeState = new TreeState(circuit, descTreeState, paramTreeState);

    // Asociamos el icon
    iconNot = new IconGate(not);
    iconTreeState = new IconGate(treeState);
View Full Code Here

Examples of clojure.asm.Label

    @Override
    public void visitTypeInsn(final int opcode, final String type) {
        if (opcode == Opcodes.NEW) {
            if (labels == null) {
                Label l = new Label();
                labels = new ArrayList<Label>(3);
                labels.add(l);
                if (mv != null) {
                    mv.visitLabel(l);
                }
View Full Code Here

Examples of com.alibaba.citrus.asm.Label

     * TryCatchRule
     */
    private final class TryCatchRule extends Rule {

        public final void begin(final String name, final Attributes attrs) {
            Label start = getLabel(attrs.getValue("start"));
            Label end = getLabel(attrs.getValue("end"));
            Label handler = getLabel(attrs.getValue("handler"));
            String type = attrs.getValue("type");
            getCodeVisitor().visitTryCatchBlock(start, end, handler, type);
        }
View Full Code Here

Examples of com.alibaba.fastjson.asm.Label

        MethodVisitor mw = cw.visitMethod(ACC_PUBLIC, "deserialze", "(" + getDesc(DefaultJSONParser.class)
                                                                    + getDesc(Type.class)
                                                                    + "Ljava/lang/Object;)Ljava/lang/Object;", null,
                                          null);

        Label reset_ = new Label();
        Label super_ = new Label();
        Label return_ = new Label();
        Label end_ = new Label();

        mw.visitVarInsn(ALOAD, 1);
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "getLexer", "()" + getDesc(JSONLexer.class));
        mw.visitTypeInsn(CHECKCAST, getType(JSONScanner.class)); // cast
        mw.visitVarInsn(ASTORE, context.var("lexer"));

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitFieldInsn(GETSTATIC, getType(Feature.class), "SortFeidFastMatch", "L" + getType(Feature.class) + ";");
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "isEnabled", "(" + "L" + getType(Feature.class)
                                                                                   + ";" + ")Z");
        mw.visitJumpInsn(IFEQ, super_);

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitLdcInsn(context.getClazz().getName());
        // parser.setResolveStatus

        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanType", "(Ljava/lang/String;)I");

        mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "NOT_MATCH", "I");
        mw.visitJumpInsn(IF_ICMPEQ, super_);

        // matchType

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "getBufferPosition", "()I");
        mw.visitVarInsn(ISTORE, context.var("mark"));

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "getCurrent", "()C");
        mw.visitVarInsn(ISTORE, context.var("mark_ch"));

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "token", "()I");
        mw.visitVarInsn(ISTORE, context.var("mark_token"));
       
        //ParseContext context = parser.getContext();

        Constructor<?> defaultConstructor = context.getBeanInfo().getDefaultConstructor();

        // create instance
        if (context.getClazz().isInterface()) {
            mw.visitVarInsn(ALOAD, 0);
            mw.visitVarInsn(ALOAD, 1);
            mw.visitMethodInsn(INVOKESPECIAL, getType(ASMJavaBeanDeserializer.class), "createInstance",
                               "(" + getDesc(DefaultJSONParser.class) + ")Ljava/lang/Object;");
            mw.visitTypeInsn(CHECKCAST, getType(context.getClazz())); // cast
            mw.visitVarInsn(ASTORE, context.var("instance"));
        } else {
            if (defaultConstructor != null) {
                if (Modifier.isPublic(defaultConstructor.getModifiers())) {
                    mw.visitTypeInsn(NEW, getType(context.getClazz()));
                    mw.visitInsn(DUP);
                    mw.visitMethodInsn(INVOKESPECIAL, getType(context.getClazz()), "<init>", "()V");

                    mw.visitVarInsn(ASTORE, context.var("instance"));
                } else {
                    mw.visitVarInsn(ALOAD, 0);
                    mw.visitVarInsn(ALOAD, 1);
                    mw.visitMethodInsn(INVOKESPECIAL, getType(ASMJavaBeanDeserializer.class), "createInstance",
                                       "(" + getDesc(DefaultJSONParser.class) + ")Ljava/lang/Object;");
                    mw.visitTypeInsn(CHECKCAST, getType(context.getClazz())); // cast
                    mw.visitVarInsn(ASTORE, context.var("instance"));
                }
            } else {
                mw.visitInsn(ACONST_NULL);
                mw.visitTypeInsn(CHECKCAST, getType(context.getClazz())); // cast
                mw.visitVarInsn(ASTORE, context.var("instance"));
            }
        }

        {
            mw.visitVarInsn(ALOAD, 1); // parser
            mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "getContext",
                               "()Lcom/alibaba/fastjson/parser/ParseContext;");
            mw.visitVarInsn(ASTORE, context.var("context"));

            mw.visitVarInsn(ALOAD, 1); // parser
            mw.visitVarInsn(ALOAD, context.var("context"));
            mw.visitVarInsn(ALOAD, context.var("instance"));
            mw.visitVarInsn(ALOAD, 3); // fieldName
            mw.visitMethodInsn(INVOKEVIRTUAL,
                               getType(DefaultJSONParser.class),
                               "setContext",
                               "(Lcom/alibaba/fastjson/parser/ParseContext;Ljava/lang/Object;Ljava/lang/Object;)Lcom/alibaba/fastjson/parser/ParseContext;");
            mw.visitVarInsn(ASTORE, context.var("childContext"));
        }

        mw.visitVarInsn(ALOAD, context.var("lexer"));
        mw.visitFieldInsn(GETFIELD, getType(JSONScanner.class), "matchStat", "I");
        mw.visitFieldInsn(GETSTATIC, getType(JSONScanner.class), "END", "I");
        mw.visitJumpInsn(IF_ICMPEQ, return_);

        for (int i = 0, size = context.getFieldInfoList().size(); i < size; ++i) {
            FieldInfo fieldInfo = context.getFieldInfoList().get(i);
            Class<?> fieldClass = fieldInfo.getFieldClass();
            Type fieldType = fieldInfo.getFieldType();

            mw.visitVarInsn(ALOAD, context.var("lexer"));
            mw.visitVarInsn(ALOAD, 0);
            mw.visitFieldInsn(GETFIELD, context.getClassName(), fieldInfo.getName() + "_asm_prefix__", "[C");
            if (fieldClass == boolean.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldBoolean", "([C)Z");
                mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == byte.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
                mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == short.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
                mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == int.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldInt", "([C)I");
                mw.visitVarInsn(ISTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == long.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldLong", "([C)J");
                mw.visitVarInsn(LSTORE, context.var(fieldInfo.getName() + "_asm", 2));

            } else if (fieldClass == float.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldFloat", "([C)F");
                mw.visitVarInsn(FSTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == double.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldDouble", "([C)D");
                mw.visitVarInsn(DSTORE, context.var(fieldInfo.getName() + "_asm", 2));

            } else if (fieldClass == String.class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldString",
                                   "([C)Ljava/lang/String;");
                mw.visitInsn(DUP);

                Label endCheck_ = new Label();
                mw.visitJumpInsn(IFNONNULL, endCheck_);

                mw.visitVarInsn(ALOAD, 1);
                mw.visitFieldInsn(GETSTATIC, getType(Feature.class), "InitStringFieldAsEmpty", "L"
                                                                                               + getType(Feature.class)
                                                                                               + ";");
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(DefaultJSONParser.class), "isEnabled",
                                   "(" + "L" + getType(Feature.class) + ";" + ")Z");
                mw.visitJumpInsn(IFEQ, endCheck_);

                mw.visitInsn(POP);
                mw.visitLdcInsn("");

                mw.visitLabel(endCheck_);

                mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));

            } else if (fieldClass == byte[].class) {
                mw.visitMethodInsn(INVOKEVIRTUAL, getType(JSONScanner.class), "scanFieldByteArray", "([C)[B");
                mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));
            } else if (fieldClass.isEnum()) {
                Label enumNull_ = new Label();
                mw.visitInsn(ACONST_NULL);
                mw.visitTypeInsn(CHECKCAST, getType(fieldClass)); // cast
                mw.visitVarInsn(ASTORE, context.var(fieldInfo.getName() + "_asm"));

                mw.visitVarInsn(ALOAD, 1);
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.actors.Label

  static private HashMap<String, BitmapFont> fonts = new HashMap();

  public Actor wrap (Object object) {
    if (object instanceof String) {
      if (defaultFont == null) throw new IllegalStateException("No default font has been set.");
      return new Label(null, defaultFont, (String)object);
    }
    if (object == null) {
      Group group = new Group();
      group.transform = false;
      return group;
View Full Code Here

Examples of com.badlogic.gdx.scenes.scene2d.ui.Label

    sb.setItems( items );
    return sb;
  }

  public static Label newLabel( String text ) {
    Label l = new Label( text, UISkin );
    return l;
  }
View Full Code Here

Examples of com.buschmais.cdo.neo4j.api.annotation.Label

public class Neo4jMetadataFactory implements DatastoreMetadataFactory<NodeMetadata, org.neo4j.graphdb.Label> {

    @Override
    public NodeMetadata createEntityMetadata(AnnotatedType annotatedType, Map<Class<?>, TypeMetadata<NodeMetadata>> metadataByType) {
        Label labelAnnotation = annotatedType.getAnnotation(Label.class);
        org.neo4j.graphdb.Label label = null;
        IndexedPropertyMethodMetadata<?> indexedProperty = null;
        if (labelAnnotation != null) {
            label = DynamicLabel.label(labelAnnotation.value());
            Class<?> usingIndexOf = labelAnnotation.usingIndexedPropertyOf();
            if (!Object.class.equals(usingIndexOf)) {
                indexedProperty = metadataByType.get(usingIndexOf).getIndexedProperty();
            }
        }
        return new NodeMetadata(label, indexedProperty);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.