Java 类javax.lang.model.type.UnknownTypeException 实例源码

项目:OLD-OpenJDK8    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:jBPMNSuite    文件:LocalsViewActionsProviderFilter.java   
public Action[] getActions(NodeActionsProvider original, Object node) throws UnknownTypeException, org.netbeans.spi.viewmodel.UnknownTypeException {
    Action[] actions = original.getActions(node);
    List myActions = new ArrayList();
    if (node instanceof ObjectVariable) {
        ObjectVariable objectVariable = (ObjectVariable) node;
        if (objectVariable.getClassType().getName().equals("org.jbpm.ruleflow.instance.RuleFlowProcessInstance")) {

            myActions.add(
                    Models.createAction(
                            "Open ProcessInstance Viewer",
                            new ProcessInstanceViewerAction(objectVariable),
                            Models.MULTISELECTION_TYPE_EXACTLY_ONE));
        }
    }
    if (myActions.isEmpty()) {
        return actions;
    }
    ArrayList actionToAdd = new ArrayList();
    actionToAdd.addAll(Arrays.asList(actions));
    actionToAdd.addAll(myActions);
    return (Action[]) actionToAdd.toArray(new Action[actionToAdd.size()]);
}
项目:openjdk-jdk10    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:openjdk9    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:lookaside_java-1.8.0-openjdk    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:jsr308-langtools    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:paperparcel    文件:PaperParcelDescriptor.java   
private void addAdapterForField(
    ImmutableMap.Builder<FieldDescriptor, AdapterDescriptor> fieldAdapterMap,
    FieldDescriptor field, boolean allowSerializable) {
  TypeMirror fieldType = field.type().get();
  //noinspection ConstantConditions
  if (!fieldType.getKind().isPrimitive()) {
    AdapterDescriptor adapter = adapterFactory.create(fieldType, allowSerializable);
    if (adapter != null) {
      fieldAdapterMap.put(field, adapter);
    } else {
      throw new UnknownTypeException(fieldType, field.element());
    }
  }
}
项目:infobip-open-jdk-8    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:openjdk-source-code-learn    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:s4j    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:jdk7-langtools    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:openjdk-icedtea7    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:INF5000-StaticProxy    文件:TestSymtabItems.java   
@Override
public Void visitUnknown(TypeMirror t, Types types) {
    try {
        return super.visitUnknown(t, types);
    } catch (UnknownTypeException ex) {
        System.err.println("caught " + ex);
        return null;
    }
}
项目:jBPMNSuite    文件:LocalsViewActionsProviderFilter.java   
public void performDefaultAction(NodeActionsProvider original, Object node) throws UnknownTypeException, org.netbeans.spi.viewmodel.UnknownTypeException {
    original.performDefaultAction(node);
}
项目:uber-snake    文件:Snake.java   
/**
 * Used on every game turn. Method checks "next" by direction cell for some
 * {@link CellElement} and if it have found - decides what to do with it.
 * 
 * @throws UnknownTypeException
 *             If not found what to do with found {@link CellElement}
 */
private void lunch() {
    if (direction == Direction.STOP) {
        return;
    }
    CellElement headTo = head.lookForward(direction);
    if (headTo != null) {
        if (headTo instanceof Piece) {
            Piece toPiece = (Piece) headTo;
            if (toPiece.parent.equals(this)) {
                kill();// ate himself
            } else if (toPiece.isHead()) {
                duelWith(toPiece.parent);// someone will die
            } else {
                int cutLength = toPiece.parent.nipOff(toPiece);
                score += cutLength * ALIVE_TAIL_MULTIPLIER;
                grow(cutLength / 2);
                // ate someone`s tail
            }

        } else if (headTo instanceof Food) {
            dinner((Food) headTo);
        } else if (headTo instanceof Seed) {
            weapon = (Seed) headTo;
        } else if (headTo instanceof Plant) {
            if (((Plant) headTo).getType() == PlantType.CATCHER) {
                kill();
            }
        } else {
            throw new UnknownTypeException(null, headTo);
        }
    }
}
项目:java-types    文件:ExtendedTypeKindVisitor7.java   
/**
 * Visits an unknown kind of type. This can occur if the language evolves and new kinds of types are added to the
 * {@link TypeMirror} hierarchy.
 *
 * <p>The default implementation of this method in {@code TypeKindVisitor7WithIntersectionType} will always throw
 * {@link UnknownTypeException}. This behavior is not required of a subclass.
 *
 * @param typeMirror the type to visit
 * @param parameter a visitor-specified parameter
 * @return a visitor-specified result
 * @throws UnknownTypeException a visitor implementation may optionally throw this exception
 */
@Nullable
public R visitOther(TypeMirror typeMirror, @Nullable P parameter) {
    throw new UnknownTypeException(typeMirror, parameter);
}