SDK: fix some Generics warnings
This commit is contained in:
parent
83f201e20b
commit
701da19757
@ -114,7 +114,7 @@ public class AppStateNode extends AbstractNode implements ScenePropertyChangeLis
|
||||
for (PropertySet propertySet : getPropertySets()) {
|
||||
for (Property<?> property : propertySet.getProperties()) {
|
||||
if (property instanceof SceneExplorerProperty) {
|
||||
SceneExplorerProperty prop = (SceneExplorerProperty) property;
|
||||
SceneExplorerProperty<?> prop = (SceneExplorerProperty) property;
|
||||
prop.syncValue();
|
||||
}
|
||||
}
|
||||
@ -157,7 +157,7 @@ public class AppStateNode extends AbstractNode implements ScenePropertyChangeLis
|
||||
return sheet;
|
||||
}
|
||||
|
||||
protected Property<?> makeProperty(Object obj, Class returntype, String method, String name) {
|
||||
protected Property<?> makeProperty(Object obj, Class<?> returntype, String method, String name) {
|
||||
Property<?> prop = null;
|
||||
try {
|
||||
prop = new SceneExplorerProperty(appState.getClass().cast(obj), returntype, method, null, this);
|
||||
|
@ -280,7 +280,7 @@ public class ProjectAssetManager extends DesktopAssetManager {
|
||||
* @param assetKey The asset key to get the file object for
|
||||
* @return Either a FileObject for the asset or null if not found.
|
||||
*/
|
||||
public FileObject getAssetFileObject(AssetKey assetKey) {
|
||||
public FileObject getAssetFileObject(AssetKey<?> assetKey) {
|
||||
String name = assetKey.getName();
|
||||
return getAssetFileObject(name);
|
||||
}
|
||||
|
@ -403,7 +403,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
private ScheduledThreadPoolExecutor fakeAppThread = new ScheduledThreadPoolExecutor(1);
|
||||
|
||||
public void removeCurrentStates() {
|
||||
for (Iterator<AppState> it = new ArrayList(appStateManager.getAddedStates()).iterator(); it.hasNext();) {
|
||||
for (Iterator<AppState> it = new ArrayList<AppState>(appStateManager.getAddedStates()).iterator(); it.hasNext();) {
|
||||
AppState appState = it.next();
|
||||
try {
|
||||
appStateManager.detach(appState);
|
||||
@ -468,7 +468,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
}
|
||||
|
||||
public boolean runQueuedFake() {
|
||||
Future fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
public Void call() throws Exception {
|
||||
runQueuedTasks();
|
||||
return null;
|
||||
@ -490,7 +490,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
}
|
||||
|
||||
public boolean updateFake(final float tpf) {
|
||||
Future fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
public Void call() throws Exception {
|
||||
AudioContext.setAudioRenderer(audioRenderer);
|
||||
appStateManager.update(tpf);
|
||||
@ -515,7 +515,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
}
|
||||
|
||||
public boolean renderFake() {
|
||||
Future fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
public Void call() throws Exception {
|
||||
appStateManager.render(renderManager);
|
||||
return null;
|
||||
@ -539,7 +539,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
}
|
||||
|
||||
public boolean updateExternalLogicalState(final Node externalNode, final float tpf) {
|
||||
Future fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
public Void call() throws Exception {
|
||||
externalNode.updateLogicalState(tpf);
|
||||
return null;
|
||||
@ -563,7 +563,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
}
|
||||
|
||||
public boolean updateExternalGeometricState(final Node externalNode) {
|
||||
Future fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
Future<Void> fut = fakeAppThread.submit(new Callable<Void>() {
|
||||
public Void call() throws Exception {
|
||||
externalNode.updateGeometricState();
|
||||
return null;
|
||||
@ -586,8 +586,8 @@ public class FakeApplication extends SimpleApplication {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Class getClassByName(String className) {
|
||||
Class clazz = null;
|
||||
public Class<?> getClassByName(String className) {
|
||||
Class<?> clazz = null;
|
||||
try {
|
||||
clazz = getClass().getClassLoader().loadClass(className);
|
||||
} catch (ClassNotFoundException ex) {
|
||||
@ -606,7 +606,7 @@ public class FakeApplication extends SimpleApplication {
|
||||
private void removeAllStates() {
|
||||
try {
|
||||
try {
|
||||
for (Iterator<AppState> it = new ArrayList(appStateManager.getAddedStates()).iterator(); it.hasNext();) {
|
||||
for (Iterator<AppState> it = new ArrayList<AppState>(appStateManager.getAddedStates()).iterator(); it.hasNext();) {
|
||||
AppState appState = it.next();
|
||||
appStateManager.detach(appState);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
protected final InstanceContent lookupContents;
|
||||
protected boolean readOnly = false;
|
||||
protected DataObject dataObject;
|
||||
private final List<Property> sceneProperties = Collections.synchronizedList(new LinkedList<Property>());
|
||||
private final List<Property<?>> sceneProperties = Collections.synchronizedList(new LinkedList<Property<?>>());
|
||||
|
||||
public AbstractSceneExplorerNode() {
|
||||
super(Children.LEAF, new DynamicLookup(new InstanceContent()));
|
||||
@ -144,8 +144,8 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
setSheet(createSheet());
|
||||
}
|
||||
|
||||
protected Property makeProperty(Object obj, Class returntype, String method, String name) {
|
||||
Property prop = null;
|
||||
protected Property<?> makeProperty(Object obj, Class<?> returntype, String method, String name) {
|
||||
Property<?> prop = null;
|
||||
try {
|
||||
prop = new SceneExplorerProperty(getExplorerObjectClass().cast(obj), returntype, method, null);
|
||||
prop.setName(name);
|
||||
@ -155,8 +155,8 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
return prop;
|
||||
}
|
||||
|
||||
protected Property makeProperty(Object obj, Class returntype, String method, String setter, String name) {
|
||||
Property prop = null;
|
||||
protected Property<?> makeProperty(Object obj, Class<?> returntype, String method, String setter, String name) {
|
||||
Property<?> prop = null;
|
||||
try {
|
||||
if (readOnly) {
|
||||
prop = new SceneExplorerProperty(getExplorerObjectClass().cast(obj), returntype, method, null);
|
||||
@ -171,8 +171,8 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
return prop;
|
||||
}
|
||||
|
||||
protected Property makeEmbedProperty(Object obj, Class objectClass, Class returntype, String method, String setter, String name) {
|
||||
Property prop = null;
|
||||
protected Property<?> makeEmbedProperty(Object obj, Class objectClass, Class returntype, String method, String setter, String name) {
|
||||
Property<?> prop = null;
|
||||
try {
|
||||
if (readOnly) {
|
||||
prop = new SceneExplorerProperty(objectClass.cast(obj), returntype, method, null);
|
||||
@ -187,7 +187,7 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
return prop;
|
||||
}
|
||||
|
||||
protected void createFields(Class c, Sheet.Set set, Object obj) throws SecurityException {
|
||||
protected void createFields(Class<?> c, Sheet.Set set, Object obj) throws SecurityException {
|
||||
for (Field field : c.getDeclaredFields()) {
|
||||
PropertyDescriptor prop = PropertyUtils.getPropertyDescriptor(c, field);
|
||||
if (prop != null) {
|
||||
@ -206,7 +206,7 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
for (PropertySet propertySet : getPropertySets()) {
|
||||
for (Property<?> property : propertySet.getProperties()) {
|
||||
if(property instanceof SceneExplorerProperty){
|
||||
SceneExplorerProperty prop = (SceneExplorerProperty)property;
|
||||
SceneExplorerProperty<?> prop = (SceneExplorerProperty<?>)property;
|
||||
prop.syncValue();
|
||||
}
|
||||
}
|
||||
@ -224,7 +224,7 @@ public abstract class AbstractSceneExplorerNode extends AbstractNode implements
|
||||
}
|
||||
}
|
||||
|
||||
public Class getExplorerNodeClass() {
|
||||
public Class<?> getExplorerNodeClass() {
|
||||
return this.getClass();
|
||||
}
|
||||
|
||||
|
@ -177,12 +177,12 @@ public class JmeNode extends JmeSpatial {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getExplorerObjectClass() {
|
||||
public Class<?> getExplorerObjectClass() {
|
||||
return Node.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getExplorerNodeClass() {
|
||||
public Class<?> getExplorerNodeClass() {
|
||||
return JmeNode.class;
|
||||
}
|
||||
|
||||
|
@ -343,12 +343,12 @@ public class JmeSpatial extends AbstractSceneExplorerNode {
|
||||
|
||||
}
|
||||
|
||||
public Class getExplorerObjectClass() {
|
||||
public Class<?> getExplorerObjectClass() {
|
||||
return Spatial.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getExplorerNodeClass() {
|
||||
public Class<?> getExplorerNodeClass() {
|
||||
return JmeSpatial.class;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user