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