com.sun.codemodel.JDirectClass Maven / Gradle / Ivy
Go to download
Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources.
In other words: the *tool* to generate java classes for the given xml representation.
package com.sun.codemodel;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;
/**
* A special {@link JClass} that represents an unknown class (except its name.)
*
* @author Kohsuke Kawaguchi
* @see JCodeModel#directClass(String)
*/
final class JDirectClass extends JClass {
private final String fullName;
public JDirectClass(JCodeModel _owner,String fullName) {
super(_owner);
this.fullName = fullName;
}
public String name() {
int i = fullName.lastIndexOf('.');
if(i>=0) return fullName.substring(i+1);
return fullName;
}
public String fullName() {
return fullName;
}
public JPackage _package() {
int i = fullName.lastIndexOf('.');
if(i>=0) return owner()._package(fullName.substring(0,i));
else return owner().rootPackage();
}
public JClass _extends() {
return owner().ref(Object.class);
}
public Iterator _implements() {
return Collections.emptyList().iterator();
}
public boolean isInterface() {
return false;
}
public boolean isAbstract() {
return false;
}
protected JClass substituteParams(JTypeVar[] variables, List bindings) {
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy