public JType toType(Outline o, Aspect aspect) { return itemType.toType(o,aspect).array(); }
public JType toType(Outline o, Aspect aspect) { return itemType.toType(o,aspect).array(); }
public JType toType(Outline o, Aspect aspect) { return itemType.toType(o,aspect).array(); }
public JType toType(Outline o, Aspect aspect) { return itemType.toType(o,aspect).array(); }
public JType toType(Outline o, Aspect aspect) { return itemType.toType(o,aspect).array(); }
@Override public JExpression unwrapCondifiton(JExpression source) { final JType type = getTypeRef().getTarget().toType(outline.parent(), Aspect.EXPOSED); return JOp._instanceof(source, type); }
@Override public JExpression unwrapCondifiton(JExpression source) { final JType type = getTypeRef().getTarget().toType(outline.parent(), Aspect.EXPOSED); return JOp._instanceof(source, type); }
@Override protected JExpression unwrap(JExpression source) { final JType type = getTypeRef().getTarget().toType(outline.parent(), Aspect.EXPOSED); return JExpr.cast(type, super.unwrap(source)); }
public int compare( final CElementInfo o1, final CElementInfo o2 ) { final JClass javaClass1; final JClass javaClass2; if ( this.hasClass ) { javaClass1 = (JClass) o1.toType( this.outline, Aspect.IMPLEMENTATION ); javaClass2 = (JClass) o2.toType( this.outline, Aspect.IMPLEMENTATION ); } else { javaClass1 = (JClass) o1.getContentType().toType( this.outline, Aspect.IMPLEMENTATION ); javaClass2 = (JClass) o2.getContentType().toType( this.outline, Aspect.IMPLEMENTATION ); } int ret = 0; if ( !javaClass1.binaryName().equals( javaClass2.binaryName() ) ) { if ( javaClass1.isAssignableFrom( javaClass2 ) ) { ret = -1; } else if ( javaClass2.isAssignableFrom( javaClass1 ) ) { ret = 1; } } return ret; }
@Override protected JExpression unwrap(JExpression source) { final JType type = getTypeRef().getTarget().toType(outline.parent(), Aspect.EXPOSED); return JExpr.cast(type, super.unwrap(source)); }
protected JClass getDeclaredType() { final CElementPropertyInfo property = getElementInfo().getProperty(); if (property.getAdapter() == null) { @SuppressWarnings("unused") final CNonElement type = property.ref().iterator().next(); final JClass declaredType = (JClass) getType().toType( outline.parent(), Aspect.EXPOSED); return declaredType; } else { return (JClass) property.getAdapter().customType.toType(outline.parent(), Aspect.EXPOSED); } }
protected JClass getDeclaredType() { final CElementPropertyInfo property = getElementInfo().getProperty(); if (property.getAdapter() == null) { @SuppressWarnings("unused") final CNonElement type = property.ref().iterator().next(); final JClass declaredType = (JClass) getType().toType( outline.parent(), Aspect.EXPOSED); return declaredType; } else { return (JClass) property.getAdapter().customType.toType(outline.parent(), Aspect.EXPOSED); } }
@Override protected JExpression unwrap(JExpression source) { return codeModel.ref(JAXBElementUtils.class).staticInvoke("getName") .arg( JExpr.cast(codeModel.ref(JAXBElement.class).narrow( elementType.toType(outline.parent(), Aspect.EXPOSED).boxify()), source)); }
@Override protected JExpression unwrap(JExpression source) { return codeModel.ref(JAXBElementUtils.class).staticInvoke("getValue") .arg( JExpr.cast(codeModel.ref(JAXBElement.class).narrow( type.toType(outline.parent(), Aspect.EXPOSED) .boxify()), source)); }
@Override protected JExpression unwrap(JExpression source) { return codeModel.ref(JAXBElementUtils.class).staticInvoke("getValue") .arg( JExpr.cast(codeModel.ref(JAXBElement.class).narrow( type.toType(outline.parent(), Aspect.EXPOSED) .boxify()), source)); }
@Override protected JExpression unwrap(JExpression source) { return codeModel.ref(JAXBElementUtils.class).staticInvoke("getName") .arg( JExpr.cast(codeModel.ref(JAXBElement.class).narrow( elementType.toType(outline.parent(), Aspect.EXPOSED).boxify()), source)); }
@Override protected JExpression wrap(JExpression source) { final JExpression core = getCore(); return codeModel.ref(JAXBElementUtils.class).staticInvoke("wrap").arg( core).arg(source).arg( elementType.toType(outline.parent(), Aspect.EXPOSED).boxify() .dotclass()); }
@Override protected JExpression wrap(JExpression source) { final JExpression core = getCore(); return codeModel.ref(JAXBElementUtils.class).staticInvoke("wrap").arg( core).arg(source).arg( elementType.toType(outline.parent(), Aspect.EXPOSED).boxify() .dotclass()); }
private JExpression getNonElementCopyExpression( final FieldOutline fieldOutline, final CNonElement type, final JBlock block, final JExpression sourceExpr, final boolean sourceMaybeNull ) { final JType jType = type.toType( fieldOutline.parent().parent(), Aspect.IMPLEMENTATION ); block.directStatement( "// CNonElement: " + jType.binaryName() ); block.directStatement( "// " + WARNING_PREFIX + ": " + "The '" + jType.binaryName() + "'" ); block.directStatement( "// " + WARNING_PREFIX + ": type was not part of the compilation unit." ); block.directStatement( "// " + WARNING_PREFIX + ": " + "The CC-XJC plugin assumes that type to declare a 'public Object clone()' method." ); block.directStatement( "// " + WARNING_PREFIX + ": " + "If this warning is part of an 'if instanceof' block, the order of 'if instanceof'" ); block.directStatement( "// " + WARNING_PREFIX + ": " + "statements may be wrong and must be verified." ); this.log( Level.WARNING, "nonElementWarning", fieldOutline.parent().implClass.fullName(), fieldOutline.getPropertyInfo().getName( true ), jType.binaryName(), WARNING_PREFIX ); this.tryCatchCopyExpression = true; if ( sourceMaybeNull ) { return JOp.cond( sourceExpr.eq( JExpr._null() ), JExpr._null(), JExpr.cast( jType, sourceExpr.invoke( "clone" ) ) ); } else { return JExpr.cast( jType, sourceExpr.invoke( "clone" ) ); } }
final JClass identifierClass = enumLeafInfo.base.toType(outline, Aspect.EXPOSED).boxify();