public SingleWrappingClassInfoField(ClassOutlineImpl context, CPropertyInfo prop, CPropertyInfo core, CClassInfo classInfo) { super(context, prop, core); // assert prop instanceof CElementPropertyInfo; // // final CElementPropertyInfo elementPropertyInfo = // (CElementPropertyInfo) prop; // // assert elementPropertyInfo.getTypes().size() == 1; // // final CTypeRef typeRef = elementPropertyInfo.getTypes().get(0); this.classInfo = classInfo; this._class = classInfo.toType(context.parent(), Aspect.EXPOSED); }
public SingleWrappingClassInfoField(ClassOutlineImpl context, CPropertyInfo prop, CPropertyInfo core, CClassInfo classInfo) { super(context, prop, core); // assert prop instanceof CElementPropertyInfo; // // final CElementPropertyInfo elementPropertyInfo = // (CElementPropertyInfo) prop; // // assert elementPropertyInfo.getTypes().size() == 1; // // final CTypeRef typeRef = elementPropertyInfo.getTypes().get(0); this.classInfo = classInfo; this._class = classInfo.toType(context.parent(), Aspect.EXPOSED); }
public JClass getScope(CClassInfo scope) { if (scope == null) { return codeModel.ref(GlobalScope.class); } else { return scope.toType(outline.parent(), Aspect.EXPOSED); } }
public JClass getScope(CClassInfo scope) { if (scope == null) { return codeModel.ref(GlobalScope.class); } else { return scope.toType(outline.parent(), Aspect.EXPOSED); } }
public int compare( final CClassInfo o1, final CClassInfo o2 ) { final JClass javaClass1 = o1.toType( this.outline, Aspect.IMPLEMENTATION ); final JClass javaClass2 = o2.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; }
private JExpression getClassInfoCopyExpression( final FieldOutline fieldOutline, final CClassInfo type, final JBlock block, final JExpression sourceExpr, final boolean sourceMaybeNull ) { block.directStatement( "// CClassInfo: " + type.toType( fieldOutline.parent().parent(), Aspect.IMPLEMENTATION ).binaryName() ); if ( sourceMaybeNull ) { return JOp.cond( sourceExpr.eq( JExpr._null() ), JExpr._null(), sourceExpr.invoke( "clone" ) ); } else { return sourceExpr.invoke( "clone" ); } }
final JClass classType = c.toType( field.parent().parent(), Aspect.IMPLEMENTATION ); ( classInfo.getAdapterUse() != null && classInfo.getAdapterUse().customType != null ? classInfo.getAdapterUse().customType.toType( field.parent().parent(), Aspect.IMPLEMENTATION ) : classInfo.toType( field.parent().parent(), Aspect.IMPLEMENTATION ) );
final JClass classType = c.toType( field.parent().parent(), Aspect.IMPLEMENTATION ); ( classInfo.getAdapterUse() != null && classInfo.getAdapterUse().customType != null ? classInfo.getAdapterUse().customType.toType( field.parent().parent(), Aspect.IMPLEMENTATION ) : classInfo.toType( field.parent().parent(), Aspect.IMPLEMENTATION ) );
final CClassInfo classInfo = (CClassInfo)typeInfo.getTypeInfo(); final QName elementName = typeInfo.getTagName(); final JClass elementType = classInfo.toType(this.pluginContext.outline, Aspect.EXPOSED); final String fieldName = this.pluginContext.outline.getModel().getNameConverter().toVariableName(elementName.getLocalPart()); final String propertyName = this.pluginContext.outline.getModel().getNameConverter().toPropertyName(elementName.getLocalPart());
if(tagRef.getTypeInfo() instanceof CClassInfo) { final CClassInfo classInfo = (CClassInfo)tagRef.getTypeInfo(); elementType = classInfo.toType(this.pluginContext.outline, Aspect.EXPOSED); overrideAddMethods(superPropertyOutline, elementName, elementType); } else if(tagRef.getTypeInfo() instanceof CElementInfo) {