/** Create a JvmType for a Python type. * * @param pythonName the python type name. * @return the type. */ @SuppressWarnings("static-method") protected JvmType newType(String pythonName) { final JvmGenericType type = TypesFactory.eINSTANCE.createJvmGenericType(); final int index = pythonName.indexOf("."); //$NON-NLS-1$ if (index <= 0) { type.setSimpleName(pythonName); } else { type.setPackageName(pythonName.substring(0, index - 1)); type.setSimpleName(pythonName.substring(index + 1)); } return type; }
localType.setSimpleName(localType.getSimpleName() + '_' + (i++));
protected JvmGenericType createJvmGenericType(/* @Nullable */ EObject sourceElement, /* @Nullable */ String name) { if (sourceElement == null || name == null) return null; Pair<String, String> fullName = splitQualifiedName(name); final JvmGenericType result = typesFactory.createJvmGenericType(); result.setSimpleName(fullName.getSecond()); if (fullName.getFirst() != null) result.setPackageName(fullName.getFirst()); result.setVisibility(JvmVisibility.PUBLIC); return result; }
setVisibility(clazz, result); result.internalSetIdentifier(clazz.getName()); result.setSimpleName(clazz.getSimpleName()); if (clazz.getDeclaringClass() == null && clazz.getPackage() != null) result.setPackageName(clazz.getPackage().getName());
setVisibility(clazz, result); result.internalSetIdentifier(clazz.getName()); result.setSimpleName(clazz.getSimpleName()); if (clazz.getDeclaringClass() == null && clazz.getPackage() != null) result.setPackageName(clazz.getPackage().getName());
JvmFeature container) { final JvmGenericType inferredType = typesFactory.createJvmGenericType(); inferredType.setSimpleName(localClassName); inferredType.setAnonymous(!hasAdditionalMembers(anonymousClass)); inferredType.setFinal(true);
inferredJvmType.setSimpleName(localClassName); inferredJvmType.setAnonymous(!hasAdditionalMembers(anonymousClass)); inferredJvmType.setFinal(true);
innerType.setFinal(false); final String innerTypeName = Capacity.ContextAwareCapacityWrapper.class.getSimpleName(); innerType.setSimpleName(innerTypeName);