Java Code Examples for com.sun.codemodel.internal.JDefinedClass#_implements
The following examples show how to use
com.sun.codemodel.internal.JDefinedClass#_implements .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SourceLocationAddOn.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 2
Source File: SourceLocationAddOn.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 3
Source File: SourceLocationAddOn.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 4
Source File: SourceLocationAddOn.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 5
Source File: SourceLocationAddOn.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 6
Source File: SourceLocationAddOn.java From hottub with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 7
Source File: SourceLocationAddOn.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 8
Source File: SourceLocationAddOn.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public boolean run( Outline outline, Options opt, ErrorHandler errorHandler ) { for( ClassOutline ci : outline.getClasses() ) { JDefinedClass impl = ci.implClass; if (ci.getSuperClass() == null) { JVar $loc = impl.field(JMod.PROTECTED, Locator.class, fieldName); $loc.annotate(XmlLocation.class); $loc.annotate(XmlTransient.class); impl._implements(Locatable.class); impl.method(JMod.PUBLIC, Locator.class, "sourceLocation").body()._return($loc); JMethod setter = impl.method(JMod.PUBLIC, Void.TYPE, "setSourceLocation"); JVar $newLoc = setter.param(Locator.class, "newLocator"); setter.body().assign($loc, $newLoc); } } return true; }
Example 9
Source File: SignatureWriter.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 10
Source File: SignatureWriter.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 11
Source File: SignatureWriter.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 12
Source File: SignatureWriter.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 13
Source File: SignatureWriter.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 14
Source File: SignatureWriter.java From hottub with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 15
Source File: SignatureWriter.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }
Example 16
Source File: SignatureWriter.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
private void dump( ClassOutline ci ) throws IOException { JDefinedClass cls = ci.implClass; StringBuilder buf = new StringBuilder(); buf.append("interface "); buf.append(cls.name()); boolean first=true; Iterator itr = cls._implements(); while(itr.hasNext()) { if(first) { buf.append(" extends "); first=false; } else { buf.append(", "); } buf.append( printName((JClass)itr.next()) ); } buf.append(" {"); println(buf.toString()); indent++; // dump the field for( FieldOutline fo : ci.getDeclaredFields() ) { String type = printName(fo.getRawType()); println(type+' '+fo.getPropertyInfo().getName(true)+';'); } dumpChildren(cls); indent--; println("}"); }